stdlib Timer bug

Rudolph van Graan rvg@REDACTED
Mon Oct 10 13:44:22 CEST 2005


I've made a simple patch for the issue which solves it on my machine:

in timer.erl:

231,237c231
<                     NewTime = case (SysTime - Time) of
<                     I when I > (Interv * 4)->
<                       %% RvG Don't try to catch up on events
<                       SysTime - (Interv * 2);
<                     I ->
<                       Time + Interv
<                   end,
---
 >                   NewTime = Time + Interv,

In this case, we only catch up if we are less than 4 intervals behind

Rudolph van Graan

On 10 Oct 2005, at 12:43 PM, Matthias Lang wrote:

> Michael McDaniel writes:
>
>
>> I seem to remember an environment variable or flag that can
>> be set to change timer behaviour from gradual synchronization
>> to instant synchronization with system clock.
>> However, I cannot find any reference, and may be remembering
>> incorrectly.
>>
>
> Your memory is correct. It's the  +c  flag for the emulator. It's
> documented on the 'erl' manpage:
>
>   http://erlang.se/doc/doc-5.4.8/erts-5.4.8/doc/html/erl.html
>
> Matthias
>
>




More information about the erlang-questions mailing list