On 5/16/19 9:17 PM, Steven Schveighoffer wrote:
On 5/16/19 4:55 PM, Vladimir Panteleev wrote:
If the output is meant for the developer, then I disagree subjectively, as that creates the impression that the lowest resolution or representable unit of time is the nanosecond.

It is what it is. The reason hnsecs is used instead of nsecs is because it gives a time range of 20,000 years instead of 2,000 years.

We do have a nanosecond resolution, and it's just rounded down to the nearest 10.

And to prove my point about it being an obscure term, I forgot it's not 10 nanoseconds, but 100 nanoseconds. oops!


For example:

     auto d = 15.nsecs;
     assert(d == 10.nsecs);

This is not what I was trying to say, even though it's true (both are Duration.zero).

I meant:

auto d = 150.nsecs;
assert(d == 100.nsecs);

-Steve

Reply via email to