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.
sf::Time 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 restart=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  restart = false)

Resets the stopwatch's time to zero.

Parameters:
restartTrue if the stopwatch continues to run, false if it waits 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: