# File lib/progress_bar/components/timer.rb, line 17 def pause stop end
# File lib/progress_bar/components/timer.rb, line 33 def reset @started_at = nil @stopped_at = nil end
# File lib/progress_bar/components/timer.rb, line 21 def resume start end
# File lib/progress_bar/components/timer.rb, line 8 def start @started_at = stopped? ? now - (@stopped_at - @started_at) : now @stopped_at = nil end
# File lib/progress_bar/components/timer.rb, line 25 def started? !!@started_at end
# File lib/progress_bar/components/timer.rb, line 13 def stop @stopped_at = now end
# File lib/progress_bar/components/timer.rb, line 29 def stopped? !!@stopped_at end