Kohi Game Engine
clock.h
Go to the documentation of this file.
1 
13 #pragma once
14 #include "defines.h"
15 
20 typedef struct clock {
28 
35 
41 
KAPI void clock_stop(clock *clock)
Stops the provided clock. Does not reset elapsed time.
struct clock clock
Represents a basic clock, which can be used to track time deltas in the system.
KAPI void clock_update(clock *clock)
Updates the provided clock. Should be called just before checking elapsed time. Has no effect on non-...
KAPI void clock_start(clock *clock)
Starts the provided clock. Resets elapsed time.
This file contains global type definitions which are used throughout the entire engine and applicatio...
#define KAPI
Import/export qualifier.
Definition: defines.h:177
double f64
64-bit floating point number
Definition: defines.h:50
Represents a basic clock, which can be used to track time deltas in the system.
Definition: clock.h:20
f64 start_time
The start time of the clock. If never started, this is 0.
Definition: clock.h:22
f64 elapsed
The amount of time in seconds that have elapsed since this clock was started. Only accurate after a c...
Definition: clock.h:26