[][src]Module clock_core::timer

Timer

A timer that mimics iOS's timer.

Usage

  • Use Timer::new(<duration>) to initialise a new timer instance. <duration> is a chrono::Duration. The timer is paused at the duration you specified and will not run until you call .resume() or .pause_or_resume().
  • While running, call .pause_or_resume(), .pause() or .resume() to pause or resume.
  • When you want to stop (reset), call .stop(), which resets the timer and returns TimerData

Structs

Timer

A countdown timer

TimerData