Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers

Simple time interface for getting time since application start with millisecond resolution. More...

Collaboration diagram for Time:

Functions

uint32_t TIME_ReadAbsoluteTime (void)
 Get the number of milliseconds since program start. More...
 
int TIME_Cmp (uint32_t aT1, uint32_t aT2)
 Compare the time arguments, including the loop-around nature of the time value. More...
 
void TIME_MicroTimerStart (void)
 start microseconds timer More...
 
uint32_t TIME_MicroTimerStop (void)
 stop microseconds timer More...
 
uint32_t TIME_MicroTimerGet (void)
 get microseconds timer while running More...
 

Detailed Description

Simple time interface for getting time since application start with millisecond resolution.

Function Documentation

◆ TIME_Cmp()

int TIME_Cmp ( uint32_t  aT1,
uint32_t  aT2 
)

Compare the time arguments, including the loop-around nature of the time value.

Note that this function will be inaccurate if there is more than 2^31 milliseconds difference.

Parameters
aT1T1
aT2T2
Return values
0T1 == T2
1T1 > T2
-1T1 < T2

◆ TIME_MicroTimerGet()

uint32_t TIME_MicroTimerGet ( void  )

get microseconds timer while running

Returns
time since start in [us]

◆ TIME_MicroTimerStart()

void TIME_MicroTimerStart ( void  )

start microseconds timer

◆ TIME_MicroTimerStop()

uint32_t TIME_MicroTimerStop ( void  )

stop microseconds timer

Returns
time since start in [us]

◆ TIME_ReadAbsoluteTime()

uint32_t TIME_ReadAbsoluteTime ( void  )

Get the number of milliseconds since program start.

Returns
The number of milliseconds since program start