[erlang-questions] About erlang:statistics/1 and timeout values

mats cronqvist masse@REDACTED
Thu Apr 23 14:54:24 CEST 2009

Oscar Hellström <oscar@REDACTED> writes:

> mats cronqvist wrote:
>> Oscar Hellström <oscar@REDACTED> writes:
>>> Hi,
>>> I was looking at statistics in the erlang module and found that
>>> statistics(runtime) and statistics(wall_clock) returns something called
>>> Time_Sinse_Last_Call. I assume that this is "since last call by the
>>> calling process" and not a globally kept value. 
>>   AFAIK, time since last call is per emulator, not per process. Thus,
>>   it is worse than useless.
>>   mats
> Yes, you're right. The call from the spawned process probably happened
> after the call from the shell process. This shows the actual behaviour:
> 29> spawn(fun() -> statistics(wall_clock) end), timer:sleep(10),
> statistics(wall_clock).
> {1363798390,14}
> This is sad though, since it really does make it worse than useless. 

  Making it undocumented would probably be the best. Then at least
  people wouldn't waste time trying to figure it out.


More information about the erlang-questions mailing list