[erlang-questions] Get Erlang node uptime and way to test it is working
Thu Jun 22 10:45:24 CEST 2017
Would be good to patch the uptime function in c.erl, in that case, since
that uses wall_clock.
2017-06-20 12:56 GMT+02:00 Rickard Green <rickard@REDACTED>:
> tis 20 juni 2017 kl. 09:21 skrev Mithun B <mithunb@REDACTED>:
>> Hi all,
>> We are using "erlang:statistics(wall_clock)" to get the Erlang node up
>> time in millisecond.
>> It works fine till 49 days, but on 49th day it will role back to start
>> from 0 millisecond.
>> I need to know two things here, First of all, a different method for how
>> to test it, I don't want to wait for 49+ days to see it works or not.
>> Secondly, I need to know a method which gives proper up time even after
>> 49+ days. How about following:
>> "(erlang:monotonic_time() - erlang:system_info(start_time)) div
> Apart from the assumption of nanosecond native time unit this is the way
> to do it. Use erlang:convert_time_unit() instead. There are Erlang systems
> not using nanoseconds as native time unit.
> Rickard Green, Erlang/OTP
>> If any one having more insight on this, please shed some light on these
>> Thanks and regards,
>> Mithun B
>> erlang-questions mailing list
> Rickard Green, Erlang/OTP, Ericsson AB
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions