Flint Engine
Modular C++20 2D game engine powered by SDL3
Loading...
Searching...
No Matches
Flint::Clock Class Reference

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.
 

Detailed Description

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.

Definition at line 13 of file time.h.


The documentation for this class was generated from the following file: