A basic timer class to assist in timed operations. More...
#include <timer.h>
Public Member Functions | |
Timer () | |
Class Constructor. | |
~Timer () | |
Class Destructor. | |
Mezzanine::CountMode | GetCountMode () const |
Gets the mode the timer is using to increment time. More... | |
Whole | GetCurrentTime () |
Gets the Current time in Microseconds. More... | |
Whole | GetCurrentTimeInMilliseconds () |
Gets the Current time in Milliseconds. More... | |
String | GetTimeAsText (const Mezzanine::TimeFormat Format) |
Gets the current time of this Timer as a string. More... | |
Boole | IsStopped () |
Gets whether or not this Timer is currently running. More... | |
Boole | IsTicking () |
Gets whether or not this Timer is currently running. More... | |
void | Reset (const Whole StartTime=0) |
Sets the current time to an initial value and stops the Timer if it is running. More... | |
void | SetCountMode (const Mezzanine::CountMode Mode) |
Sets the mode the timer should use to increment time. More... | |
void | SetCurrentTime (const Whole Current) |
Sets the current time in Microseconds. More... | |
void | SetCurrentTimeInMilliseconds (const Whole Current) |
Sets the current time in Milliseconds. The time that resetting sets the Timer to. More... | |
void | Start () |
Activates the Timer. | |
void | Stop () |
Deactivates the Timer. | |
Protected Types | |
typedef MaxInt(* | CountFunct) (const MaxInt, const MaxInt) |
Convenience type for processing the current time. More... | |
Protected Member Functions | |
MaxInt | UpdateTime () |
Updates the current time being tracked by this timer. More... | |
Protected Attributes | |
MaxInt | CurrentTime |
The current amount of microseconds that has elapsed since starting to track time. More... | |
MaxInt | LastStamp |
The time stamp from when the last time the Timer was updated. More... | |
CountFunct | TimerCounter |
A pointer to the function currently doing the counting for this Timer. More... | |
Mezzanine::CountMode Mezzanine::Timer::GetCountMode | ( | ) | const |
Whole Mezzanine::Timer::GetCurrentTime | ( | ) |
Whole Mezzanine::Timer::GetCurrentTimeInMilliseconds | ( | ) |
String Mezzanine::Timer::GetTimeAsText | ( | const Mezzanine::TimeFormat | Format | ) |
Boole Mezzanine::Timer::IsStopped | ( | ) |
Boole Mezzanine::Timer::IsTicking | ( | ) |
void Mezzanine::Timer::Reset | ( | const Whole | StartTime = 0 | ) |
void Mezzanine::Timer::SetCountMode | ( | const Mezzanine::CountMode | Mode | ) |
void Mezzanine::Timer::SetCurrentTime | ( | const Whole | Current | ) |
void Mezzanine::Timer::SetCurrentTimeInMilliseconds | ( | const Whole | Current | ) |
|
protected |
|
protected |
|
protected |
|
protected |