|
SPARK
0.1.0
A general purpose game engine written in C++.
|
A class that can be used to measure time like a stopwatch. More...
#include <Clock.h>
Public Member Functions | |
| Clock () | |
| Instantiates a new clock and starts it. | |
| Clock (const Clock &other)=default | |
| Clock (Clock &&other) noexcept=default | |
| Clock & | operator= (const Clock &other)=default |
| Clock & | operator= (Clock &&other) noexcept=default |
| template<typename T > requires IsDuration<T> | |
| float | elapsedTime () const |
| Gets the elapsed time since the clock start. | |
| void | restart () |
| Restarts the clock. | |
| template<typename T > requires IsDuration<T> | |
| float | restart () |
| Restarts the clock and gets the elapsed time. | |
A class that can be used to measure time like a stopwatch.
|
nodiscard |
Gets the elapsed time since the clock start.
| T | The unit of the returned time |
|
nodiscard |
Restarts the clock and gets the elapsed time.
| T | The unit of the returned time |