[erlang-questions] Unexpected behaviour of timer:sleep

Scott Lystig Fritchie fritchie@REDACTED
Wed Mar 19 22:49:01 CET 2008

shehan <shehan@REDACTED> wrote:

s> (test@REDACTED)15> timer:tc(timer, sleep, [1]).
s> {15000,ok}

s> I expected value is, between 1000 to 2000.

Your expected value should be greater than or equal to the greater of:

   1. the argument to timer:sleep/1
   2. your OS's timer resolution

A common value for #2 is 1/100th of a second for Linux kernels.


More information about the erlang-questions mailing list