Zigbee Protocol Controller 1.6.0

Macros

#define CLOCK_SECOND
 

Functions

int clock_lte (clock_time_t t1, clock_time_t t2)
 
void clock_init (void)
 
CCIF clock_time_t clock_time (void)
 
void clock_delay (unsigned int d)
 
int clock_fine_max (void)
 
unsigned short clock_fine (void)
 
CCIF unsigned long clock_seconds (void)
 

Detailed Description

The clock library is the interface between Contiki and the platform specific clock functionality. The clock library performs a single function: measuring time. Additionally, the clock library provides a macro, CLOCK_SECOND, which corresponds to one second of system time.

Note
The clock library need in many cases not be used directly. Rather, the timer library or the event timers should be used.
See also
Timer library
Event timers

Macro Definition Documentation

◆ CLOCK_SECOND

#define CLOCK_SECOND

A second, measured in system clock time.

Function Documentation

◆ clock_delay()

void clock_delay ( unsigned int  d)

This is a asynchronous delay function.

Attention
Due to UNIFY running in the same thread as Z-Wave protocol, a vTaskDelay() was not a good idea and this function is now returning immediately. No delays are allowed.
Parameters
dDelay in seconds.

◆ clock_fine()

unsigned short clock_fine ( void  )

◆ clock_fine_max()

int clock_fine_max ( void  )

◆ clock_init()

void clock_init ( void  )

Initialize the clock library.

This function initializes the clock library and should be called from the main() function of the system.

◆ clock_lte()

int clock_lte ( clock_time_t  t1,
clock_time_t  t2 
)

Check if clock time t1 is less than or equal to clock time t2.

Since clock_time_t may be an unsigned type, use this function for comparison.

See also
E.g., IETF RFC 1982 https://tools.ietf.org/rfc/rfc1982.txt.

Return value is greater than 0 if t1 is equal to t2 or if t1 is less than t2 (modulo max clock_time).

◆ clock_seconds()

CCIF unsigned long clock_seconds ( void  )

◆ clock_time()

CCIF clock_time_t clock_time ( void  )

Get the current clock time.

This function returns the current system clock time.

Returns
The current clock time, measured in system ticks.