zenilib: Zeni::Time 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 Types | Public Member Functions | List of all members
Zeni::Time Class Reference
Zenilib

A Snapshot of the Timer. More...

`#include <Timer.h>`

## Public Types

typedef float | Second_Type
typedef size_t | Tick_Type

## Public Member Functions

| Time ()
| Initialize to the current time. More...
| Time (const Tick_Type &ticks)
float | get_seconds_passed () const
| Get the number of seconds passed since this Time. More...
float | get_seconds_since (const Time &time) const
| Get the number of seconds passed between 'time' and this Time. More...
Tick_Type | get_ticks_passed () const
| Get the number of clock ticks passed since this Time. More...
Tick_Type | get_ticks_since (const Time &time) const
| Get the number of clock ticks passed between 'time' and this Time. More...
bool | operator< (const Time &rhs) const
Time & | operator= (const Tick_Type &ticks)
void | update ()
| Update to current Time. More...

## Detailed Description

A Snapshot of the Timer.

Note
  Guaranteed millisecond precision

Author
  bazald

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

Definition at line 63 of file Timer.h.

## Member Typedef Documentation

typedef float Zeni::Time::Second_Type

Definition at line 66 of file Timer.h.

typedef size_t Zeni::Time::Tick_Type

Definition at line 65 of file Timer.h.

## Constructor & Destructor Documentation

Zeni::Time::Time | ( |  | ) |

Initialize to the current time.

Definition at line 35 of file Timer.cpp.

Zeni::Time::Time | ( | const Tick_Type & | ticks | ) |

Definition at line 30 of file Timer.cpp.

## Member Function Documentation

float Zeni::Time::get_seconds_passed | ( |  | ) | const

inline

Get the number of seconds passed since this Time.

Definition at line 36 of file Timer.hxx.

References get_ticks_passed().

float Zeni::Time::get_seconds_since | ( | const Time & | time | ) | const

inline

Get the number of seconds passed between 'time' and this Time.

Definition at line 44 of file Timer.hxx.

References get_ticks_since().

Referenced by Zeni::Game::run().

Time::Tick_Type Zeni::Time::get_ticks_passed | ( |  | ) | const

inline

Get the number of clock ticks passed since this Time.

Definition at line 32 of file Timer.hxx.

References Zeni::Timer::get_ticks(), and Zeni::get_Timer().

Referenced by get_seconds_passed().

Time::Tick_Type Zeni::Time::get_ticks_since | ( | const Time & | time | ) | const

inline

Get the number of clock ticks passed between 'time' and this Time.

Definition at line 40 of file Timer.hxx.

Referenced by Zeni::Video_GL_Fixed::end_render(), Zeni::Video_GL_Shader::end_render(), get_seconds_since(), and Zeni::Widget_Input_Repeater::perform_logic().

bool Zeni::Time::operator< | ( | const Time & | rhs | ) | const

inline

Definition at line 52 of file Timer.hxx.

Time & Zeni::Time::operator= | ( | const Tick_Type & | ticks | ) |

inline

Definition at line 27 of file Timer.hxx.

void Zeni::Time::update | ( |  | ) |

inline

Update to current Time.

Definition at line 48 of file Timer.hxx.

References Zeni::Timer::get_ticks(), and Zeni::get_Timer().

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