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

Nicholas Schultz-Møller nicholassm@REDACTED
Thu Jul 31 23:26:06 CEST 2008


Hi,


Starting two Eshells on a single machine with the commands:

erl -sname rip
erl -sname rup

and running

X = now(),
Self = self(),
spawn(rup@REDACTED, fun() -> Self ! now() end),
receive Y ->
    io:format("Diff=~w~n", [timer:now_diff(Y, X)])
end.

yields "Diff=-1000" and occational a positive value as one would expect.
(Hostname is Nway.)

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

I'm running this using R12B-3 and the machine has a dual core processor.


Regards,

Nicholas Schultz-Møller
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080731/e2f02869/attachment.htm>


More information about the erlang-questions mailing list