FOREIGN DEFINITION MODULE SysClock; IMPORT IMPLEMENTATION FROM "sysclock.obj"; (* ========================================================= *) (* Preliminary module for Gardens Point Modula *) (* Proposed BSI/ISO Standard Modula-2 Library *) (* copyright assigned by R. Sutcliffe to BSI *) (* version 1990 12 14 *) (* Permission is given to copy this Definition Module, with *) (* the copy right notice intact, for the purpose of *) (* evaluation and test. *) (* Status : for review by ISO/IEC STC1/SC22/WG13 *) (* Note : This module may change form in the future *) (* ========================================================= *) CONST maxSecondParts = 99; (* implementation defined constant *) (* The value here implies the clock delivers 0.01 second *) TYPE Month = [1 .. 12]; Day = [1 ..31]; Hour = [0 .. 23]; Min = [0 .. 59]; Sec = [0 .. 59]; Fraction = [0 .. maxSecondParts]; (* parts of a second *) UTCDiff = [-780 .. 720]; (* Time zone Differential Factor *) (* the number of minutes that must be added to local time to obtain UTC. *) DateTime = RECORD year : CARDINAL; month : Month; day : Day; hour : Hour; minute : Min; second : Sec; fractions: Fraction; zone : UTCDiff; SummerTimeFlag : BOOLEAN; (* interpretation: local usage *) END; PROCEDURE CanGetClock () : BOOLEAN; (* Tests if a clock can be read *) PROCEDURE CanSetClock () : BOOLEAN; (* Tests if a clock can be set *) PROCEDURE IsValidDateTime (userData : DateTime) : BOOLEAN; (* Tests if the value of userData is a valid *) PROCEDURE GetClock (VAR userData : DateTime); (* Assigns local date and time of day to userData *) PROCEDURE SetClock (userData : DateTime); (* Sets the system clock to the given local date and time *) END SysClock.