[erlang-questions] now() seems to produce inconsistent timestamps.

Dominic Williams erlang@REDACTED
Fri Aug 1 01:04:07 CEST 2008


Hi Nicholas,

Nicholas Schultz-Møller a écrit :

> Is this a bug or a feature? Does two or more Eshells not
> agree on the time when running on the same host???

It's a feature. now() is guaranteed never to return the same
value twice, even if you call it from the same shell,
process, or whatever, practically instantaneously.

E.g.

1> {now(), now()}.
{{1217,545379,571066},{1217,545379,571070}}


Cheers,

Dominic Williams
http://dominicwilliams.net

----



More information about the erlang-questions mailing list