30 #ifndef ZENI_CHRONOMETER_H
31 #define ZENI_CHRONOMETER_H
54 typename TIME::Second_Type
seconds()
const;
55 void set(
const typename TIME::Second_Type &time);
60 void scale(
const typename TIME::Second_Type &scaling_factor =
typename TIME::Second_Type(1));
63 typename TIME::Second_Type m_seconds_counted;
69 typename TIME::Second_Type m_scaling_factor;
77 static std::set<Chronometer<TIME> *> & get_chronometers();
78 static std::set<Chronometer<TIME> *> & get_paused();
79 static bool g_are_paused;
Chronometer & operator=(const Chronometer< TIME > &rhs)
void scale(const typename TIME::Second_Type &scaling_factor=typename TIME::Second_Type(1))
Scale the amount of time that passes by some amount.
void set(const typename TIME::Second_Type &time)
Set the number of seconds counted by the Chronometer.
const TIME::Second_Type & scaling_factor() const
Get the scaling factor.
static void pause_all()
Pause all Chronometer<TIME> objects.
const bool & is_running() const
Get whether the Chronometer is currently counting or stopped.
const TIME & stop()
Stop the Chronometer and get the current TIME.
A stoppable running timer.
static bool are_paused()
Check to see if all Chronometer<TIME> objects are paused.
void reset()
Reset the Chronometer. This does NOT stop the Chronometer.
TIME::Second_Type seconds() const
Get the number of seconds counted by the Chronometer.
const TIME & start()
Start the Chronometer and get the current TIME. This does NOT reset the Chronometer.
static void unpause_all()
Unpause all Chronometer<TIME> objects.