class Timmy::MasterTimer

Public Class Methods

get() click to toggle source
# File lib/timmy/master_timer.rb, line 9
def get
  return @frozen_duration if @frozen_duration

  Time.now.to_f - @start_time
end
set(frozen_duration) click to toggle source
# File lib/timmy/master_timer.rb, line 15
def set(frozen_duration)
  @frozen_duration = frozen_duration
end
start(frozen_time = nil) click to toggle source
# File lib/timmy/master_timer.rb, line 4
def start(frozen_time = nil)
  @start_time = frozen_time if frozen_time
  @start_time ||= Time.now.to_f
end