Kohi Game Engine
clock.h File Reference

This file contains structures and functions for the engine's clock. More...

#include "defines.h"

Go to the source code of this file.

Data Structures

struct  clock
 Represents a basic clock, which can be used to track time deltas in the system. More...
 

Typedefs

typedef struct clock clock
 Represents a basic clock, which can be used to track time deltas in the system. More...
 

Functions

KAPI void clock_update (clock *clock)
 Updates the provided clock. Should be called just before checking elapsed time. Has no effect on non-started clocks. More...
 
KAPI void clock_start (clock *clock)
 Starts the provided clock. Resets elapsed time. More...
 
KAPI void clock_stop (clock *clock)
 Stops the provided clock. Does not reset elapsed time. More...
 

Detailed Description

This file contains structures and functions for the engine's clock.

Author
Travis Vroman (travi.nosp@m.s@ko.nosp@m.hieng.nosp@m.ine..nosp@m.com)
Version
1.0
Date
2022-01-10

Typedef Documentation

◆ clock

typedef struct clock clock

Represents a basic clock, which can be used to track time deltas in the system.

Function Documentation

◆ clock_start()

KAPI void clock_start ( clock clock)

Starts the provided clock. Resets elapsed time.

Parameters
cloclA pointer to the clock to be started.

◆ clock_stop()

KAPI void clock_stop ( clock clock)

Stops the provided clock. Does not reset elapsed time.

Parameters
clockA pointer to the clock to be stopped.

◆ clock_update()

KAPI void clock_update ( clock clock)

Updates the provided clock. Should be called just before checking elapsed time. Has no effect on non-started clocks.

Parameters
clockA pointer to the clock to be updated.