[erlang-questions] hrtime/0, Was: now/0 resolution

Mikael Pettersson <>
Wed Sep 12 11:22:07 CEST 2007


On Wed, 12 Sep 2007 09:42:08 +0200, Raimo Niskanen wrote:
> Serge apparently want a new BIF e.g hrtime/0 that would return
> the best high resolution time the implementation knows on the
> running OS. The precision would be OS dependant, but the best
> known to the emulator, and it would be the fastest way to get it.
> This BIF could also be suitable for getting high resolution
> CPU time as well as wallclock time.
> 
> How much interest for such a BIF is there from the community?

Please clarify: do you propose hrtime (high-res actual time)
or hrvtime (high-res virtual time). The latter is very useful
for benchmarking, and HiPE in fact has a private BIF for it
but only for a few non-standard Linux system.

/Mikael



More information about the erlang-questions mailing list