Re: erlang:monotonic_time() is negative

Loïc Hoguin <[email protected]> Tue, 1 Sep 2015 15:42:02 +0200
Newsgroups gmane.comp.lang.erlang.bugs
Organization Nine Nines
Message-ID <[email protected]>
On 09/01/2015 02:20 PM, Sergej Jurečko wrote:
> hello,
>
> Using 18.0.3 on OS X 10.10.5. I even tried rebooting the machine to
> check if the time turns negative after a while, but it seems it is
> always negative.
>
> erlang:monotonic_time().
> -576460736152226213

 From the docs, emphasis added:

Different runtime system instances will use different unspecified points 
in time as base for their Erlang monotonic clocks. That is, it is 
pointless comparing monotonic times from different runtime system 
instances. Different runtime system instances may also place this 
unspecified point in time different relative runtime system start. It 
may be placed in the future (time at start will be a *negative value*), 
the past (time at start will be a positive value), or the runtime system 
start (time at start will be zero).

It's surprising the first time I admit.

-- 
Loïc Hoguin
http://ninenines.eu
Author of The Erlanger Playbook,
A book about software development using Erlang
_______________________________________________
erlang-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs