[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exposing subsecond precision in current-seconds

From: Lassi Kortela
Subject: Re: Exposing subsecond precision in current-seconds
Date: Wed, 29 Apr 2020 19:52:58 +0300
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

Microseconds since epoch? Are you sure about this?

What else would the new current-microseconds return?

Since startup, or since some undefined point of time. I see no sense in using
an absolute basetime, as such a timing command will in nearly all use cases
be used for relative timing. One should also attempt to reduce the range to
avoid bignum allocation, I think.

With sub-millisecond timers, it may make sense to figure out in advance which particular applications those timers would be used for, and then design a specific timing interface for each of them. Application-specific knowledge will probably improve the accuracy of timing and help select a useful precision, epoch and timing source.

One obvious application is code profiling, in which case the timer can be part of the profiling framework. What are some other applications?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]