View Source Recode.StopWatch (Recode v0.6.5)
A stopwatch to measure times in milliseconds.
Examples
iex> alias Recode.StopWatch
iex> StopWatch.init!(:test)
iex> StopWatch.start!(:test, :foo)
iex> t1 = StopWatch.time!(:test, :foo)
iex> Process.sleep(1)
iex> t2 = StopWatch.time!(:test, :foo)
iex> Process.sleep(1)
iex> StopWatch.stop!(:test, :foo)
iex> t3 = StopWatch.time!(:test, :foo)
iex> t1 < t2 and t2 < t3
true
iex> t3 == StopWatch.time!(:test, :foo)
true