zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Zeni::Chronometer< TIME > Class Template Reference

A stoppable running timer. More...

#include <Chronometer.h>

Public Member Functions

 Chronometer ()
 
 Chronometer (const Chronometer< TIME > &rhs)
 
 ~Chronometer ()
 
const bool & is_running () const
 Get whether the Chronometer is currently counting or stopped. More...
 
Chronometeroperator= (const Chronometer< TIME > &rhs)
 
void reset ()
 Reset the Chronometer. This does NOT stop the Chronometer. More...
 
void scale (const typename TIME::Second_Type &scaling_factor=typename TIME::Second_Type(1))
 Scale the amount of time that passes by some amount. More...
 
const TIME::Second_Type & scaling_factor () const
 Get the scaling factor. More...
 
TIME::Second_Type seconds () const
 Get the number of seconds counted by the Chronometer. More...
 
void set (const typename TIME::Second_Type &time)
 Set the number of seconds counted by the Chronometer. More...
 
const TIMEstart ()
 Start the Chronometer and get the current TIME. This does NOT reset the Chronometer. More...
 
const TIMEstop ()
 Stop the Chronometer and get the current TIME. More...
 

Static Public Member Functions

static bool are_paused ()
 Check to see if all Chronometer<TIME> objects are paused. More...
 
static void pause_all ()
 Pause all Chronometer<TIME> objects. More...
 
static void unpause_all ()
 Unpause all Chronometer<TIME> objects. More...
 

Detailed Description

template<class TIME>
class Zeni::Chronometer< TIME >

A stoppable running timer.

Author
bazald

Contact: bazal.nosp@m.d@ze.nosp@m.nipex.nosp@m..com

Definition at line 40 of file Chronometer.h.

Constructor & Destructor Documentation

template<class TIME >
Zeni::Chronometer< TIME >::Chronometer ( )

Definition at line 30 of file Chronometer.hxx.

template<class TIME >
Zeni::Chronometer< TIME >::~Chronometer ( )

Definition at line 39 of file Chronometer.hxx.

template<class TIME >
Zeni::Chronometer< TIME >::Chronometer ( const Chronometer< TIME > &  rhs)

Definition at line 45 of file Chronometer.hxx.

Member Function Documentation

template<class TIME >
bool Zeni::Chronometer< TIME >::are_paused ( )
static

Check to see if all Chronometer<TIME> objects are paused.

Definition at line 151 of file Chronometer.hxx.

template<class TIME >
const bool & Zeni::Chronometer< TIME >::is_running ( ) const

Get whether the Chronometer is currently counting or stopped.

Definition at line 76 of file Chronometer.hxx.

template<class TIME >
Chronometer< TIME > & Zeni::Chronometer< TIME >::operator= ( const Chronometer< TIME > &  rhs)

Definition at line 59 of file Chronometer.hxx.

template<class TIME >
void Zeni::Chronometer< TIME >::pause_all ( )
static

Pause all Chronometer<TIME> objects.

Definition at line 156 of file Chronometer.hxx.

Referenced by Zeni::Popup_State::on_push().

template<class TIME >
void Zeni::Chronometer< TIME >::reset ( )

Reset the Chronometer. This does NOT stop the Chronometer.

Definition at line 129 of file Chronometer.hxx.

template<class TIME >
void Zeni::Chronometer< TIME >::scale ( const typename TIME::Second_Type &  scaling_factor = typename TIME::Second_Type(1))

Scale the amount of time that passes by some amount.

Definition at line 140 of file Chronometer.hxx.

template<class TIME >
const TIME::Second_Type & Zeni::Chronometer< TIME >::scaling_factor ( ) const

Get the scaling factor.

Definition at line 135 of file Chronometer.hxx.

template<class TIME >
TIME::Second_Type Zeni::Chronometer< TIME >::seconds ( ) const

Get the number of seconds counted by the Chronometer.

Definition at line 114 of file Chronometer.hxx.

template<class TIME >
void Zeni::Chronometer< TIME >::set ( const typename TIME::Second_Type &  time)

Set the number of seconds counted by the Chronometer.

Definition at line 121 of file Chronometer.hxx.

template<class TIME >
const TIME & Zeni::Chronometer< TIME >::start ( )

Start the Chronometer and get the current TIME. This does NOT reset the Chronometer.

Definition at line 81 of file Chronometer.hxx.

template<class TIME >
const TIME & Zeni::Chronometer< TIME >::stop ( )

Stop the Chronometer and get the current TIME.

Definition at line 97 of file Chronometer.hxx.

template<class TIME >
void Zeni::Chronometer< TIME >::unpause_all ( )
static

Unpause all Chronometer<TIME> objects.

Definition at line 174 of file Chronometer.hxx.

Referenced by Zeni::Popup_State::on_pop().


The documentation for this class was generated from the following files: