Kohi Game Engine
kclock.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  kclock
 Represents a basic clock, which can be used to track time deltas in the system. More...
 

Typedefs

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

Functions

KAPI void kclock_update (kclock *clock)
 Updates the provided clock. Should be called just before checking elapsed time. Has no effect on non-started clocks. More...
 
KAPI void kclock_start (kclock *clock)
 Starts the provided clock. Resets elapsed time. More...
 
KAPI void kclock_stop (kclock *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

◆ kclock

typedef struct kclock kclock

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

Function Documentation

◆ kclock_start()

KAPI void kclock_start ( kclock clock)

Starts the provided clock. Resets elapsed time.

Parameters
cloclA pointer to the clock to be started.

◆ kclock_stop()

KAPI void kclock_stop ( kclock clock)

Stops the provided clock. Does not reset elapsed time.

Parameters
clockA pointer to the clock to be stopped.

◆ kclock_update()

KAPI void kclock_update ( kclock 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.