[erlang-questions] Unexpected behaviour of timer:sleep

shehan shehan@REDACTED
Wed Mar 19 13:23:49 CET 2008

In WindowsXP. 

How ever in Red Hat Enterprise Linux ES release 3, below result came. It is
also more than that. So timer:sleep(1) cannot be used as it is. I need to
suspend process for 1 millisecond. But it is suspend 12 or 13 milliseconds.
Then my requirement cannot be achieved.

(test@REDACTED)1> timer:tc(timer, sleep, [1]).
(test@REDACTED)2> timer:tc(timer, sleep, [1]).

-----Original Message-----
From: erlang-questions-bounces@REDACTED
[mailto:erlang-questions-bounces@REDACTED] On Behalf Of Bjorn Gustavsson
Sent: Wednesday, March 19, 2008 4:58 PM
To: erlang-questions@REDACTED
Subject: Re: [erlang-questions] Unexpected behaviour of timer:sleep

"shehan" <shehan@REDACTED> writes:

> Hi all,
> When I am running following command, unexpected value came as result. Why
> that??
> (test@REDACTED)15> timer:tc(timer, sleep, [1]).  
> {15000,ok}

Which operating system do you run Erlang on? 

Björn Gustavsson, Erlang/OTP, Ericsson AB
erlang-questions mailing list

More information about the erlang-questions mailing list