[erlang-questions] Unexpected behaviour of timer:sleep

James Hague james.hague@REDACTED
Wed Mar 19 14:49:29 CET 2008

On Wed, Mar 19, 2008 at 8:14 AM, Bengt Kleberg
<bengt.kleberg@REDACTED> wrote:
>  Have you tested
>  receive
>  after 1 -> ok
>  end.
>  It might be more accurate.

Not under OS X it isn't.  I started a thread about this last year:
there's no way to sleep with a granularity of less than 10-15
milliseconds.  The group discussion pinned this on the underlying
operating system, which I'm not sure I buy.  Rather horribly, I
resorted to a busy wait loop that continually calls now/0, which works
perfectly, but sure causes the fan on my MacBook to spin up.


More information about the erlang-questions mailing list