An actor, whether user or supervisor, may get the time elapsed since the last reboot through the following system call:
#include <exec/chTime.h> int sysTime(KnTimeVal* time);
This will fill in the time data structure which is built from two fields:
tmSec which indicates the number of whole seconds elapsed since the last reboot
tmNSec which indicates the number of nanoseconds
The resolution of the value depends on the platform on which the system is running, and may be obtained by a call to:
#include <chorus.h> int sysTimeGetRes(KnTimeVal* resolution);
The time value returned at the location defined by the resolution parameter represents the smallest possible difference between two distinct values of the system time.