Bromeon
Public Member Functions
thor::StopWatch Class Reference

Pausable clock class that measures elapsed time. More...

List of all members.

Public Member Functions

 StopWatch (bool initiallyRunning=false)
 Constructor: Sets up a new StopWatch with time zero.
float GetElapsedTime () const
 Returns the totally elapsed time.
bool IsRunning () const
 Checks if the stopwatch is currently running.
void Start ()
 Starts or continues the stopwatch.
void Stop ()
 Pauses the stopwatch.
void Reset (bool continueRunning=false)
 Resets the stopwatch's time to zero.

Detailed Description

Pausable clock class that measures elapsed time.

Unlike sf::Clock, this clock can be paused and continued at any time.


Constructor & Destructor Documentation

thor::StopWatch::StopWatch ( bool  initiallyRunning = false) [explicit]

Constructor: Sets up a new StopWatch with time zero.

Parameters:
initiallyRunningSpecifies whether the stopwatch immediately starts.

Member Function Documentation

void thor::StopWatch::Reset ( bool  continueRunning = false)

Resets the stopwatch's time to zero.

Parameters:
continueRunningDeclares if the stopwatch is running further or waiting for the next Start() call.

Starts or continues the stopwatch.

If it is already running, nothing happens.

Pauses the stopwatch.

If it is already paused, nothing happens.


The documentation for this class was generated from the following file: