IoTivity-Lite
Clock library

The clock library is the interface between Contiki and the platform specific clock functionality.

The clock library is the interface between Contiki and the platform specific clock functionality.

The clock library defines a macro, CLOCK_SECOND, to convert seconds into the tick resolution of the platform. Typically this is 1-10 milliseconds, e.g. 4*CLOCK_SECOND could be 512. A 16 bit counter would thus overflow every 1-10 minutes. Platforms use the tick interrupt to maintain a long term count of seconds since startup.