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

Raimo Niskanen raimo+erlang-questions@REDACTED
Wed Sep 12 15:33:41 CEST 2007

On Wed, Sep 12, 2007 at 11:22:07AM +0200, Mikael Pettersson wrote:
> 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.

I guess both. Actual time is more essential, but virtual time
(CPU time) often more useful. Either two BIFs or a BIB with
an option.

> /Mikael


/ Raimo Niskanen, Erlang/OTP, Ericsson AB

More information about the erlang-questions mailing list