Sync
This commit is contained in:
parent
6f050a029e
commit
776bba907c
3887 changed files with 59894 additions and 7280 deletions
|
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env escript
|
||||
%% -*- erlang -*-
|
||||
%%! -smp enable -sname sleepsort
|
||||
|
||||
main(Args) ->
|
||||
lists:foreach(fun(Arg) ->
|
||||
timer:send_after(5 * list_to_integer(Arg), self(), Arg)
|
||||
end, Args),
|
||||
loop(length(Args)).
|
||||
|
||||
loop(0) ->
|
||||
ok;
|
||||
loop(N) ->
|
||||
receive
|
||||
Num ->
|
||||
io:format("~s~n", [Num]),
|
||||
loop(N - 1)
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue