[Return to Top] [Kernel Objects]

EROS Object Reference

Kernel Objects

TimeOfDay

D R A F T

Description

The TimeOfDay key provides information about the current time in various forms. It can be used both to learn the calendar day and date as reported by the underlying hardware, and to discover the number of milliseconds since the system was last restarted.

Note that posession of the time of day allows a program to coordinate its behavior with other programs even in the absence of an overt channel. In highly secure environments it may be appropriate to restrict the availability of this key.


Operations

Check Alleged Key Type (OC = KT)

Returns the alleged type of the key.
ReplyR10x10000002: Key is a TimeOfDay key.

Get Hardware Time of Day (OC = 1)

Returns the current time of day as reported by the hardware's time of day clock. The accuracy of this information is platform dependent, as is the handling of time zones and such.

ReplyWCurrent year.
WDay of year.
BDay of week.
BMonth.
BDay of month.
BHour (24 hour format)
Bminute
Bsecond
Result0Time returned okay.
KT+1Unknown order code

Get milliseconds since startup (OC = 16)

Returns the number of milliseconds that have passed since the machine was last powered up. This can be used in conjunction with the sleep key to wake up at a particular time.

ReplyLMilliseconds since startup
Result0Time returned okay.
KT+1Unknown order code


Copyright 1998 by Jonathan Shapiro. All rights reserved. For terms of redistribution, see the GNU General Public License