home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / xco212p.zip / ISODEF / sysclock.def < prev    next >
Text File  |  1995-09-01  |  1KB  |  46 lines

  1. (* (c) xTech 1992,93. All Rights Reserved *)
  2. DEFINITION MODULE SysClock;
  3.  
  4. CONST
  5.   maxSecondParts = 99;
  6.   (* The value here implies the clock can deliver hundreth's second accuracy *)
  7.  
  8. TYPE
  9.   Month    = [1..12];
  10.   Day      = [1..31];
  11.   Hour     = [0..23];
  12.   Min      = [0..59];
  13.   Sec      = [0..59];
  14.   Fraction = [0..maxSecondParts]; (* part of the second *)
  15.   UTCDiff  = [-780..720]; (* Time zone Differential Factor *)
  16.   (* the number of minutes that must be added to local time to obtain UTC. *)
  17.   DateTime = RECORD
  18.     year           : CARDINAL;
  19.     month          : Month;
  20.     day            : Day;
  21.     hour           : Hour;
  22.     minute         : Min;
  23.     second         : Sec;
  24.     fractions      : Fraction;
  25.     zone           : UTCDiff;
  26.     SummerTimeFlag : BOOLEAN; (* interpretation: local usage *)
  27.   END;
  28.  
  29. PROCEDURE CanGetClock(): BOOLEAN;
  30. (* Tests if the clock can be read *)
  31.  
  32. PROCEDURE CanSetClock(): BOOLEAN;
  33. (* Tests if the clock can be set *)
  34.  
  35. PROCEDURE IsValidDateTime(userData: DateTime): BOOLEAN;
  36. (* Tests if the value of userData is a valid *)
  37.  
  38. PROCEDURE GetClock(VAR userData: DateTime);
  39. (* Assigns local date and time of the day to userData *)
  40.  
  41. PROCEDURE SetClock(uderData: DateTime);
  42. (* Sets the system time clock to the given local date and time *)
  43.  
  44. END SysClock.
  45.  
  46.