[erlang-questions] Newbie question: wait until an absolute time

Christian S chsu79@REDACTED
Fri Feb 1 16:19:51 CET 2008


> Hello,
>
> the reason behind your decision is to limit loss of precision,
> i.e. take potential time drifting into account?
>
> Ladislav Lenart

Yes. Another reason is that 2^32 seconds divided by 24h*3600*1000
milliseconds in a day is around 49 days.

Matthias Lang also brought attention to code-upgrades which are much
simpler if you dont have to involve system messages.

Another good thing is that you can easily add to the receive clause
(accepting messages) since you have already implemented your code to
adjust the timeout to what is remaining before it goes to sleep. Say
if you want to add "time remaining", "expire time" and such
operations.



More information about the erlang-questions mailing list