[erlang-questions] erlang:send_after accuracy on os x
Rapsey
rapsey@REDACTED
Tue May 5 09:19:52 CEST 2009
I resorted to using a simple external program that I open a port to:
int main(int argc, char *argv[])
{
for (;;)
{
char c[1];
usleep(3000);
if (write(1, c, 1) <= 0)
break;
}
return 0;
}
Works just fine :)
Sergej
On Tue, May 5, 2009 at 5:22 AM, Rob Elsner <thatsnotright@REDACTED> wrote:
> Sergej,
>
> Linux does have the problem, but it's slightly more accurate at times.
> I've done a lot of experimenting with timers in Erlang, and the best
> I've come up with is a linked-in driver to expose the Linux timer_fd
> interface. I have some code I'm going to post on GIT here in the
> future which encapsulates this.
>
> Rob
>
> On Mon, May 4, 2009 at 6:49 AM, Rapsey <rapsey@REDACTED> wrote:
> > Does anyone know why erlang:send_after is at most accurate at 10ms on OS
> X?
> > It's the same problem with timer module also,
> > timer:send_interval(5,{timeout}), is going to send a message after 10mili
> > and then the next one immediately after, then again at 10mili seconds and
> so
> > on.
> > Linux does not seem to have this problem.
> >
> >
> > thank you,
> > Sergej
> >
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED
> > http://www.erlang.org/mailman/listinfo/erlang-questions
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090505/1d360cb5/attachment.htm>
More information about the erlang-questions
mailing list