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

Summary

Functions

Link to this function

init!(name \\ :stop_watch)

View Source
Link to this macro

start!(name \\ :stop_watch, key)

View Source (macro)
Link to this macro

stop!(name \\ :stop_watch, key)

View Source (macro)
Link to this macro

time!(name \\ :stop_watch, key)

View Source (macro)