zenilib: Zeni::Timer Class Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Friends | List of all members
Zeni::Timer Class Reference
Zenilib

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 Timer & | get ()
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.

Time Zeni::Timer::get_time | ( |  | ) |

inline

Get the current Time.

Definition at line 69 of file Timer.hxx.

Referenced by Zeni::Video_GL_Fixed::end_render(), Zeni::Video_GL_Shader::end_render(), Zeni::Widget_Input_Repeater::on_key(), Zeni::Widget_Input_Repeater::perform_logic(), Zeni::Text_Box::seek(), and Zeni::Text_Box::seek_cursor().

## 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:

- zenilib/jni/external/zenilib/zeni_core/Zeni/Timer.h
- zenilib/jni/external/zenilib/zeni_core/Timer.cpp
- zenilib/jni/external/zenilib/zeni_core/Zeni/Timer.hxx