[erlang-questions] Timer

Ulf Wiger ulf@REDACTED
Sat Dec 22 08:56:38 CET 2007


2007/12/21, Sten Kvamme <sten@REDACTED>:
> I'm working on a vector graphics  animation in Ex11. What is the best
> way to implement acceleration (exponential time delay)? Is it best
> done in C? The timer module doesn't work on my Mac OS X. timer:sleep
> () gives me the following error: Error in process <0.42.0> with exit
> value: {undef,[{timer,sleep,[[500]]},{trigger,for,4},{trigger,trig,1}]}

{undef,[{timer,sleep,[[500]]},...]} means that you have tried to call
timer:sleep([500]), which should by all means give an exit, but
not 'undef'...

timer:sleep() doesn't exist, and should give you an
{undef,[{timer,sleep,[]}...]}.

Try timer:sleep(Milliseconds) instead.

BR,
Ulf W



More information about the erlang-questions mailing list