c: Add _Decimal64x support
[official-gcc.git] / gcc / m2 / gm2-libs-iso / SysClock.def
blob3e22f36e006fb7ff52b2977d733b05e75c3b406b
1 (* Library module defined by the International Standard
2 Information technology - programming languages
3 BS ISO/IEC 10514-1:1996E Part 1: Modula-2, Base Language.
5 Copyright ISO/IEC (International Organization for Standardization
6 and International Electrotechnical Commission) 1996-2021.
8 It may be freely copied for the purpose of implementation (see page
9 707 of the Information technology - Programming languages Part 1:
10 Modula-2, Base Language. BS ISO/IEC 10514-1:1996). *)
12 DEFINITION MODULE SysClock;
14 (* Facilities for accessing a system clock that records the date
15 and time of day *)
17 CONST
18 maxSecondParts = 1000000 ;
20 TYPE
21 Month = [1 .. 12];
22 Day = [1 .. 31];
23 Hour = [0 .. 23];
24 Min = [0 .. 59];
25 Sec = [0 .. 59];
26 Fraction = [0 .. maxSecondParts];
27 UTCDiff = [-780 .. 720];
28 DateTime =
29 RECORD
30 year: CARDINAL;
31 month: Month;
32 day: Day;
33 hour: Hour;
34 minute: Min;
35 second: Sec;
36 fractions: Fraction; (* parts of a second *)
37 zone: UTCDiff; (* Time zone differential
38 factor which is the number
39 of minutes to add to local
40 time to obtain UTC. *)
41 summerTimeFlag: BOOLEAN; (* Interpretation of flag
42 depends on local usage. *)
43 END;
45 PROCEDURE CanGetClock(): BOOLEAN;
46 (* Tests if the clock can be read *)
48 PROCEDURE CanSetClock(): BOOLEAN;
49 (* Tests if the clock can be set *)
51 PROCEDURE IsValidDateTime(userData: DateTime): BOOLEAN;
52 (* Tests if the value of userData is a valid *)
54 PROCEDURE GetClock(VAR userData: DateTime);
55 (* Assigns local date and time of the day to userData *)
57 PROCEDURE SetClock(userData: DateTime);
58 (* Sets the system time clock to the given local date and
59 time *)
61 END SysClock.