* rtimer
 
* rtimer
   −
== Source code ==
+
== Overview ==
    
The functions of all types of timers are located inside folder '''core/sys/{timer, stimer, ctimer, etimer, rtimer}.{c,h}'''. A complete documentation of Timers in Contiki can be found [https://github.com/contiki-os/contiki/wiki/Timers here].
 
The functions of all types of timers are located inside folder '''core/sys/{timer, stimer, ctimer, etimer, rtimer}.{c,h}'''. A complete documentation of Timers in Contiki can be found [https://github.com/contiki-os/contiki/wiki/Timers here].
 
The '''timer''' and '''stimer''' are the most basic types of timers and are used to check if a time interval has passed. They do not notice when the time period has elapsed, so the application needs to check periodically if they have expired. The difference between them is the resolution: ''timers'' use system clock ticks, which gives high granularity (order of microseconds) but short overflow periods (order of seconds). On the other hand, ''stimers'' use seconds to allow much longer time periods (order of years), but has lesser granularity.  
 
The '''timer''' and '''stimer''' are the most basic types of timers and are used to check if a time interval has passed. They do not notice when the time period has elapsed, so the application needs to check periodically if they have expired. The difference between them is the resolution: ''timers'' use system clock ticks, which gives high granularity (order of microseconds) but short overflow periods (order of seconds). On the other hand, ''stimers'' use seconds to allow much longer time periods (order of years), but has lesser granularity.  
   Exception encountered, of type "Error"