curriculum
curriculum copied to clipboard
Timer - Timer.seconds should be Timer.seconds.get_time per requirements
Describe the issue Timer.seconds should be Timer.seconds.get_time per requirements
{:ok, pid} = Timer.start_link([])
Timer.get_time(pid)
0
Process.sleep(1500)
Timer.seconds(pid)
1
@moduledoc """ iex> {:ok, pid} = Timer.start_link([]) iex> Timer.seconds(pid) 0 iex> Process.sleep(1200) iex> Timer.seconds(pid) 1 """
Expected behavior Updates:
{:ok, pid} = Timer.start_link([])
Timer.get_time(pid)
0
Process.sleep(1500)
Timer.get_time(pid)
1
@moduledoc """ iex> {:ok, pid} = Timer.start_link([]) iex> Timer.get_time(pid) 0 iex> Process.sleep(1200) iex> Timer.get_time(pid) 1 """