class Timers::Interval
A collection of timers which may fire at different times
def duration
def duration rrent
def initialize
def initialize @total = 0.0 @current = nil end
def now
def now .clock_gettime(::Process::CLOCK_MONOTONIC)
def start
def start return if @current @current = now end
def stop
def stop return unless @current @total += duration @current = nil end
def to_f
def to_f @total + duration end