- /*======================================================================
- return: the time left (in millisecond)
- note : the returned value can be negative
- ======================================================================*/
- int get_left();
+ /** returns the period of the timer or 0 if it isn't started */
+ float get_period() const
+ { return period; }
+ float get_timeleft() const
+ { return period - (global_time - cycle_start); }
+ float get_timegone() const
+ { return global_time - cycle_start; }
+ bool started() const
+ { return period != 0 && get_timeleft() > 0; }