Jo Engine  2024.04.28
Jo Sega Saturn Engine
Macros | Enumerations | Functions | Variables
time.h File Reference

Time Management. More...

Go to the source code of this file.

Macros

#define JO_TIME_CKS_32_MODE
 
#define JO_TIME_M_CKS
 

Enumerations

enum  jo_time_memory_address { RegisterHighFRC, RegisterLowFRC, RegisterTCR, RegisterSysClock }
 

Functions

static __jo_force_inline void jo_time_poke_byte (jo_time_memory_address addr, unsigned char data)
 
static __jo_force_inline unsigned char jo_time_peek_byte (jo_time_memory_address addr)
 
static __jo_force_inline void jo_time_poke_int (jo_time_memory_address addr, unsigned int data)
 
static __jo_force_inline unsigned int jo_time_peek_int (jo_time_memory_address addr)
 
static __jo_force_inline int jo_time_get_frc (void)
 Get Free Running Counter value. More...
 
static __jo_force_inline void jo_time_set_frc (unsigned char reg)
 
unsigned int jo_get_ticks (void)
 get ticks count More...
 
void jo_fixed_point_time (void)
 get ticks count More...
 

Variables

jo_fixed time_in_seconds
 Will increment fixed-point 1 every second since starting jo_fixed_point_time() More...
 
jo_fixed delta_time
 Represent the delta time (in fixed-point seconds) between each frame. More...
 

Detailed Description

Time Management.

Author
Johannes Fetz
Bug:
No known bugs.

Macro Definition Documentation

◆ JO_TIME_CKS_32_MODE

#define JO_TIME_CKS_32_MODE

◆ JO_TIME_M_CKS

#define JO_TIME_M_CKS

Enumeration Type Documentation

◆ jo_time_memory_address

Enumerator
RegisterHighFRC 

High Free Running Counter Register (FCR), counts up to 255, then iterates FCR Low.

RegisterLowFRC 

Low Free Running Counter Register (FCR), increases every time FCR high reaches 256.

RegisterTCR 

Time Control Register (TCR)

RegisterSysClock 

System clock register.

Function Documentation

◆ jo_fixed_point_time()

void jo_fixed_point_time ( void  )

get ticks count

Warning
run only once per frame!

◆ jo_get_ticks()

unsigned int jo_get_ticks ( void  )

get ticks count

Returns
ticks count from jo_core_run()

◆ jo_time_get_frc()

static __jo_force_inline int jo_time_get_frc ( void  )
static

Get Free Running Counter value.

◆ jo_time_peek_byte()

static __jo_force_inline unsigned char jo_time_peek_byte ( jo_time_memory_address  addr)
static

◆ jo_time_peek_int()

static __jo_force_inline unsigned int jo_time_peek_int ( jo_time_memory_address  addr)
static

◆ jo_time_poke_byte()

static __jo_force_inline void jo_time_poke_byte ( jo_time_memory_address  addr,
unsigned char  data 
)
static

◆ jo_time_poke_int()

static __jo_force_inline void jo_time_poke_int ( jo_time_memory_address  addr,
unsigned int  data 
)
static

◆ jo_time_set_frc()

static __jo_force_inline void jo_time_set_frc ( unsigned char  reg)
static

Variable Documentation

◆ delta_time

jo_fixed delta_time

Represent the delta time (in fixed-point seconds) between each frame.

◆ time_in_seconds

jo_fixed time_in_seconds

Will increment fixed-point 1 every second since starting jo_fixed_point_time()