|
Flint Engine
Modular C++20 2D game engine powered by SDL3
|
A pausable, restartable elapsed-time clock. More...
#include <flint/time/time.h>
Collaboration diagram for Flint::Clock:Public Member Functions | |
| void | start () |
| Start the clock if it is currently stopped. | |
| void | stop () |
| Stop the clock, preserving the current elapsed time. | |
| void | restart () |
| Reset the elapsed time to zero and start the clock. | |
| Uint64 | getElapsedMilliseconds () const |
| Return the elapsed time in milliseconds. | |
| float | getElapsedSeconds () const |
| Return the elapsed time in seconds. | |
| bool | isRunning () const |
| Return true if the clock is currently running. | |
A pausable, restartable elapsed-time clock.
Tracks elapsed time in milliseconds using SDL_GetTicks(). The clock starts in a stopped state; call start() or restart() before querying.