[erlang-questions] sleep for a few microsconds

Atul Goyal atulindore2@REDACTED
Thu Nov 16 08:27:57 CET 2017


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171116/ee5fa8bb/attachment.htm>


More information about the erlang-questions mailing list