Method: Timetrap::Timer#start

Defined in:
lib/timetrap/timer.rb

#start(note, time = nil) ⇒ Object

Raises:



119
120
121
122
123
# File 'lib/timetrap/timer.rb', line 119

def start note, time = nil
  raise AlreadyRunning if running?
  time ||= Time.now
  Entry.create(:sheet => Timer.current_sheet, :note => note, :start => time).save
end