2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
8
Task/Sleep/Elixir/sleep.elixir
Normal file
8
Task/Sleep/Elixir/sleep.elixir
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
sleep = fn seconds ->
|
||||
IO.puts "Sleeping..."
|
||||
:timer.sleep(1000 * seconds) # in milliseconds
|
||||
IO.puts "Awake!"
|
||||
end
|
||||
|
||||
sec = if System.argv==[], do: 1, else: hd(System.argv) |> String.to_integer
|
||||
sleep.(sec)
|
||||
Loading…
Add table
Add a link
Reference in a new issue