DolphinV4 API  1.6.1.0
time
Collaboration diagram for time:

Modules

 TIME structures
 TIME functions

Detailed Description

The TIME module uses a HW system timer that generates a system tick at a fixed rate of one tick per millisecond. Using this system tick a system scheduler is implemented. Each millisecond the execution of the application is interrupted and the schedule takes over the CPU. The schedule executes and one of the SYSTEM-TASKS.

For more information make sure to read scheduler_page


Because most of the radio routines are called from the schedule when linking TIME module the radio module will be also linked to your application.

The TIME module offers the application the possibility to build it's own SW timers with the precission of 1ms. Using the wait function the application can stop it's execution for a certain ammount of time. The system timer is based on 32bit counter.

Note:
It may happen that the application receives less than half time slice of the CPU when several interrupts like Radio, UART, are executed one after another.
The system timer is based on a 32bit counter therfore the counter will overflow once every 49 days.
Some critical functions (like the FLASH write functions in the mem module) needs to disable all the interrupts inclusive the interrupt from the system timer. When the functions execution time is longer than 1ms it may happen that a system tick is lost. Use these functions rarely or calculate with a system tick loss!
If you need timing with higher resolution as 1ms use the functions from the timer1 module.