2 ms·
> Some programs can use gettimeofday extremely frequently This is what's usually considered the "root cause" of this problem, though. It's easy enough, if it's
by derefr 10y ago
> Some programs can use gettimeofday extremely frequently
This is what's usually considered the "root cause" of this problem, though. It's easy enough, if it's your own program, to wrap the OS time APIs to cache the evaluated timestamp for one event-loop (or for a given length of realtime by checking with the TSC.) Most modern interpreters/VM runtimes also do this.