[erlang-questions] sleep for a few microsconds

Atul Goyal atulindore2@REDACTED
Thu Nov 16 21:27:13 CET 2017


Ya ... i checked nanosleep accuracy in pure c first .. with rt priority too
... it was quite accurate..
And i am using a physical machine .
Thanks

On 17-Nov-2017 01:14, "Sergej Jurečko" <sergej.jurecko@REDACTED> wrote:

> Have you tried nanosleep accuracy in a simple C program by itself?
> Especially on a non-idle machine. Also I hope you’re not running or
> planning on running anything like that in a VM.
>
> Regards,
> Sergej
>
> > On 16 Nov 2017, at 08:27, Atul Goyal <atulindore2@REDACTED> wrote:
> >
> > hi
> >
> > I was wondering if there is a way to sleep for few u'sec in erlang . We
> are working on  Linux. And we have tried following solutions :
> >
> > 1. Used linux 'nanosleep' from a 'C' NIF ::
> > Gives 50-90% error between 1-500 microsec ... and even at 1500 microsec
> it gives 10-20% error . I tried giving high priority to Beam process ..
> same results
> >
> > 2.Busywait in Erlang function  ::
> > Isnt practical to waste CPU time when serving a large number of users
> ...Also it is only good for about 90% of the time but rest of the time
> gives 50-200% error ...
> >
> > thanks a lot
> > Atul
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED
> > http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171117/7c1be916/attachment.htm>


More information about the erlang-questions mailing list