[erlang-questions] writing a delay loop without now()

tsuraan tsuraan@REDACTED
Mon Feb 23 23:46:15 CET 2009


On 21/02/2009, Fredrik Svahn <fredrik.svahn@REDACTED> wrote:
> I get the same results as James when running R12B-5 on Windows Vista. It
> seems to be related to the algorithm for adjusting to sudden time changes.
> When disabling it with the "+c" flag it works (almost) as expected.

Interesting: when I try this, I get the opposite effect:

tsuraan@REDACTED ~/test/erlang $ erl +c
Erlang (BEAM) emulator version 5.6.1 [source] [smp:2]
[async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.6.1  (abort with ^G)
1> c(test).
{ok,test}
2> erlang:statistics(wall_clock),test:time(5000000),erlang:statistics(wall_clock).
{8852,2896}
3> erlang:statistics(wall_clock),test:time(5000000),erlang:statistics(wall_clock).
{14662,2900}
4> c(test, native).
         {ok,test}
5> erlang:statistics(wall_clock),test:time(5000000),erlang:statistics(wall_clock).
{25744,2782}
6> erlang:statistics(wall_clock),test:time(5000000),erlang:statistics(wall_clock).
{30166,2802}



More information about the erlang-questions mailing list