[erlang-questions] sleep for a few microsconds

Sergej Jurečko sergej.jurecko@REDACTED
Thu Nov 16 20:44:45 CET 2017


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




More information about the erlang-questions mailing list