timer:now_diff/2 documentation inconsistency

Serge Aleynikov serge@REDACTED
Tue Feb 28 01:17:39 CET 2006


There seems to be a documentation discrepancy:


Here's what the docs says (stdlib/timer):
-------------------------------------------------
now_diff(T2, T1) -> {Time, Value}
Types:
   T1 = T2 = {MegaSecs, Secs, MicroSecs}
   MegaSecs = Secs = MicroSecs = integer()

Calculates the time difference T2 - T1 in microseconds, where T1 and T2 
probably are timestamp tuples returned from erlang:now/0.
-------------------------------------------------


Here's the result type we get in the shell:

$ erl
Erlang (BEAM) emulator version 5.4.12 [source] [hipe] [threads:0]

Eshell V5.4.12  (abort with ^G)
1> now().
{1141,85623,555497}
2> timer:now_diff(now(), v(1)).
12178593

Regards,

Serge

-- 
Serge Aleynikov
R&D Telecom, IDT Corp.
Tel: (973) 438-3436
Fax: (973) 438-1464
serge@REDACTED



More information about the erlang-questions mailing list