Clock¶
Functions
-
sfClock *sfClock_copy(const sfClock *clock)¶
Create a new clock by copying an existing one.
- Parameters:
clock – Clock to copy
- Returns:
A new sfClock object which is a copy of clock
-
sfTime sfClock_getElapsedTime(const sfClock *clock)¶
Get the time elapsed in a clock.
This function returns the time elapsed since the last call to sfClock_restart (or the construction of the object if sfClock_restart has not been called).
- Parameters:
clock – Clock object
- Returns:
Time elapsed
-
bool sfClock_isRunning(const sfClock *clock)¶
Check whether the clock is running.
- Parameters:
clock – Clock object
- Returns:
true
if the clock is running,false
otherwise