44 #include "crossplatform.h"
50 return Current + Delta;
168 Whole Seconds = ( Milli / 1000 );
169 Whole Remainder = ( Milli % 1000 );
170 if( Remainder < 10 ) {
171 TimeStream << Seconds <<
".00" << Remainder;
172 }
else if( Remainder < 100 ) {
173 TimeStream << Seconds <<
".0" << Remainder;
175 TimeStream << Seconds <<
"." << Remainder;
182 Whole Minutes = Seconds / 60;
183 Whole Remainder = Seconds % 60;
184 if( Remainder < 10 ) {
185 TimeStream << Minutes <<
":0" << Remainder;
187 TimeStream << Minutes <<
":" << Remainder;
196 return TimeStream.str();
Mezzanine::CountMode GetCountMode() const
Gets the mode the timer is using to increment time.
~Timer()
Class Destructor.
Whole GetCurrentTime()
Gets the Current time in Microseconds.
bool Boole
Generally acts a single bit, true or false.
MaxInt CurrentTime
The current amount of microseconds that has elapsed since starting to track time. ...
MaxInt UpdateTime()
Updates the current time being tracked by this timer.
Timer()
Class Constructor.
Boole IsStopped()
Gets whether or not this Timer is currently running.
void SetCurrentTime(const Whole Current)
Sets the current time in Microseconds.
CountMode
A simple enum describing how the timer should increment time.
Outputs the current time in "minutes:seconds".
The timer counts up, meaning the Timer current time is showing time elapsed.
std::stringstream StringStream
A Datatype used for streaming operations with strings.
Boole IsTicking()
Gets whether or not this Timer is currently running.
CountFunct TimerCounter
A pointer to the function currently doing the counting for this Timer.
Whole GetCurrentTimeInMilliseconds()
Gets the Current time in Milliseconds.
Outputs the current time in "seconds.milliseconds". Milliseconds are out to 3 digits.
Outputs the current time in seconds.
void Start()
Activates the Timer.
void SetCountMode(const Mezzanine::CountMode Mode)
Sets the mode the timer should use to increment time.
void SetCurrentTimeInMilliseconds(const Whole Current)
Sets the current time in Milliseconds. The time that resetting sets the Timer to. ...
MaxInt LastStamp
The time stamp from when the last time the Timer was updated.
String GetTimeAsText(const Mezzanine::TimeFormat Format)
Gets the current time of this Timer as a string.
Outputs the current time in microseconds.
void Reset(const Whole StartTime=0)
Sets the current time to an initial value and stops the Timer if it is running.
The timer counts down, meaning the Timer current time is showing remaining time.
long long MaxInt
A large integer type suitable for compile time math and long term microsecond time keeping...
void Stop()
Deactivates the Timer.
The bulk of the engine components go in this namspace.
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
Outputs the current time in milliseconds.
TimeFormat
An enum describing how the text output of a timer should be formatted.
std::string String
A datatype used to a series of characters.