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

A High Quality Timer Singleton. More...

#include <Timer_HQ.h>

Inherits Zeni::Singleton< Timer_HQ >.

Public Member Functions

long double get_seconds ()
 Get the number of seconds passed since instantiation. More...
 
HQ_Tick_Type get_ticks ()
 Get the number of ticks passed since instantiation. More...
 
HQ_Tick_Type get_ticks_per_second ()
 Get the number of ticks per second. More...
 
Time_HQ get_time ()
 Get the current Time. More...
 
- Public Member Functions inherited from Zeni::Singleton< Timer_HQ >
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_HQ >
 

Additional Inherited Members

- Static Public Member Functions inherited from Zeni::Singleton< Timer_HQ >
static void completely_destroy ()
 
static void destroy ()
 
static Timer_HQget ()
 
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_HQ >
 Singleton ()
 
virtual ~Singleton ()
 

Detailed Description

A High Quality Timer Singleton.

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

Note
Guaranteed sub-millisecond precision (approximately microsecond)
Author
bazald

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

Definition at line 115 of file Timer_HQ.h.

Member Function Documentation

long double Zeni::Timer_HQ::get_seconds ( )
inline

Get the number of seconds passed since instantiation.

Definition at line 64 of file Timer_HQ.hxx.

References get_ticks().

HQ_Tick_Type Zeni::Timer_HQ::get_ticks ( )
inline

Get the number of ticks passed since instantiation.

Definition at line 51 of file Timer_HQ.hxx.

References Zeni::to_useconds().

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

HQ_Tick_Type Zeni::Timer_HQ::get_ticks_per_second ( )
inline

Get the number of ticks per second.

Definition at line 60 of file Timer_HQ.hxx.

Referenced by Zeni::Time_HQ::operator=().

Time_HQ Zeni::Timer_HQ::get_time ( )
inline

Get the current Time.

Definition at line 68 of file Timer_HQ.hxx.

References Zeni::to_useconds().

Friends And Related Function Documentation

friend class Singleton< Timer_HQ >
friend

Definition at line 116 of file Timer_HQ.h.


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