|
Pacman Torben Petré
|
#include <Stopwatch.h>
Public Member Functions | |
| Stopwatch (Stopwatch &other)=delete | |
| void | operator= (const Stopwatch &)=delete |
| double | getDeltaTime () const |
| Returns the deltatime, updated by Stopwatch::tick. | |
| void | tick () |
| Updates deltatime to hold the time difference between now and the last tick. | |
| void | reset () |
| Resets the Stopwatch. | |
Static Public Member Functions | |
| static Stopwatch & | getInstance () |
| Returns an instance of the Stopwatch class. | |
|
delete |
Singletons should not be cloneable or assignable.
|
nodiscard |
Returns the deltatime, updated by Stopwatch::tick.
|
staticnodiscard |
|
delete |
| void Stopwatch::reset | ( | ) |
Resets the Stopwatch.
| void Stopwatch::tick | ( | ) |
Updates deltatime to hold the time difference between now and the last tick.