5#include "flint/core/api.h"
57 Uint64 m_startTime = 0;
58 Uint64 m_pausedTime = 0;
59 bool m_running =
false;
A pausable, restartable elapsed-time clock.
FLINT_API float getElapsedSeconds() const
Return the elapsed time in seconds.
FLINT_API bool isRunning() const
Return true if the clock is currently running.
FLINT_API Uint64 getElapsedMilliseconds() const
Return the elapsed time in milliseconds.
FLINT_API void stop()
Stop the clock, preserving the current elapsed time.
FLINT_API void start()
Start the clock if it is currently stopped.
FLINT_API void restart()
Reset the elapsed time to zero and start the clock.
Utility for converting time values to milliseconds.
static FLINT_API Uint64 s_milliseconds(Uint64 ms)
Convert milliseconds to the internal millisecond representation (identity).
static FLINT_API Uint64 s_seconds(float sec)
Convert seconds to milliseconds.