[erlang-questions] sleep for a few microsconds

Vance Shipley vances@REDACTED
Thu Nov 16 09:36:45 CET 2017


On Thu, Nov 16, 2017 at 12:57 PM, Atul Goyal <atulindore2@REDACTED> wrote:
> I was wondering if there is a way to sleep for few u'sec in erlang .

Do the opposite?

1> F = fun(F, T1, T2) when T1 < T2 ->
1>           F(F, erlang:system_time(milli_seconds), T2);
1>        (_, _, _) ->
1>           ok
1> end,
1> T = erlang:system_time(milli_seconds),
1> F(F, T, T + 3).
ok


-- 
     -Vance



More information about the erlang-questions mailing list