zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Zeni::Timer Class Reference

A Timer Singleton. More...

#include <Timer.h>

Inherits Zeni::Singleton< Timer >.

Public Member Functions

float get_seconds ()
 Get the number of seconds passed since instantiation. More...
 
Time::Tick_Type get_ticks ()
 Get the number of ticks passed since instantiation. More...
 
Time::Tick_Type get_ticks_per_second ()
 Get the number of ticks per second. More...
 
Time get_time ()
 Get the current Time. More...
 
- Public Member Functions inherited from Zeni::Singleton< Timer >
void fax_post_reinit (Event::Handler *const &handler)
 
void fax_pre_uninit (Event::Handler *const &handler)
 
void give_post_reinit (Event::Handler *const &handler)
 
void give_pre_uninit (Event::Handler *const &handler)
 
void lend_post_reinit (Event::Handler *const &handler)
 
void lend_pre_uninit (Event::Handler *const &handler)
 

Friends

class Singleton< Timer >
 

Additional Inherited Members

- Static Public Member Functions inherited from Zeni::Singleton< Timer >
static void completely_destroy ()
 
static void destroy ()
 
static Timerget ()
 
static bool is_initialized ()
 
static void remove_post_reinit (Event::Handler *const &handler)
 
static void remove_pre_uninit (Event::Handler *const &handler)
 
- Protected Member Functions inherited from Zeni::Singleton< Timer >
 Singleton ()
 
virtual ~Singleton ()
 

Detailed Description

A Timer Singleton.

Rather than using multiple Timers, I recommend using just this one and storing Times wherever necessary.

Note
Guaranteed millisecond precision
Author
bazald

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

Definition at line 97 of file Timer.h.

Member Function Documentation

float Zeni::Timer::get_seconds ( )
inline

Get the number of seconds passed since instantiation.

Definition at line 65 of file Timer.hxx.

References get_ticks().

Time::Tick_Type Zeni::Timer::get_ticks ( )
inline

Get the number of ticks passed since instantiation.

Definition at line 56 of file Timer.hxx.

Referenced by get_seconds(), Zeni::Time::get_ticks_passed(), and Zeni::Time::update().

Time::Tick_Type Zeni::Timer::get_ticks_per_second ( )
inline

Get the number of ticks per second.

Definition at line 61 of file Timer.hxx.

References u.

Friends And Related Function Documentation

friend class Singleton< Timer >
friend

Definition at line 98 of file Timer.h.


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