[erlang-questions] Sending message at a specific and accurate time

Jesper Louis Andersen <>
Mon Feb 22 13:16:53 CET 2016


On Mon, Feb 22, 2016 at 12:51 PM, Joe Armstrong <> wrote:

> I get the same effect irrespective of the sleep interval if I sleep for
> 100 ms
> then the wake-up still can be still 6ms later than the requested time ...
>

Sleeping for 100ms is ages in modern computers, so it would not surprise me
one bit that you ended up going to sleep to save power in that time frame.

The Erlang VM has a compatibility layer plugging into the underlying
operating system. You would be surprised over how different they are and
what they support at the lowest level. And what the "correct means of
operation" is on system A might be a really bad idea on system B.

The right way to figure out what is happening is dtrace(1) and plugging
into the timer wheel to figure out what is happening at that level. Either
you are getting the message too late from the kernel, or you end up doing
something weird inside Erlang as a VM.

-- 
J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160222/605838ba/attachment.html>


More information about the erlang-questions mailing list