ChorusOS 5.0 Application Developer's Guide

Clock Service (tick)

The tick service enables the system to manage the clock, counting only the ticks since the last reboot. No other tick count is available.

A user or supervisor actor can obtain the time elapsed since the last reboot through the following system call:

#include <exec> 
int sysTime(KnTimeVal* time);

This call fills the time data structure, which is built from the following two fields:

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.