Win360::Win360Timer Class Reference
#include <win360timer.h>
Inheritance diagram for Win360::Win360Timer:
Detailed Description
Win32/Xbox360 implementation of the Time::Timer class. Uses the QueryPerformanceCounter() functions.
- Todo:
- solve multiprocessor issues of QueryPerformanceCounter() (different processors may return different PerformanceFrequency values, thus, threads should be prevented from switching between processors with thread affinities).
Public Member Functions | |
Win360Timer () | |
constructor | |
void | Start () |
start/continue the timer | |
void | Stop () |
stop the timer | |
void | Reset () |
reset the timer | |
bool | Running () const |
return true if currently running | |
Timing::Time | GetTime () const |
get current time in seconds | |
Timing::Tick | GetTicks () const |
get current time in ticks |
Member Function Documentation
void Win360::Win360Timer::Start | ( | ) |
start/continue the timer
Start the timer. This will update the diffTime member to reflect the accumulated time when the timer was not running (basically the difference between this timer's time and the real system time).
void Win360::Win360Timer::Stop | ( | ) |
void Win360::Win360Timer::Reset | ( | ) |
reset the timer
Reset the timer so that will start counting at zero again.
bool Win360::Win360Timer::Running | ( | ) | const |
return true if currently running
Returns true if the timer is currently running.
Timing::Time Win360::Win360Timer::GetTime | ( | ) | const |
get current time in seconds
This returns the timer's current time in seconds.
Timing::Tick Win360::Win360Timer::GetTicks | ( | ) | const |
get current time in ticks
This returns the timer's current time in "ticks". A tick is defined as one millisecond (1/1000 seconds).