-- file: Time.Mesa
-- last edited by Sandman, August 12, 1980  9:59 AM
-- Copyright  Xerox Corporation 1980

DIRECTORY
  TimeDefs USING [UnpackedTime];

Time: DEFINITIONS =
  BEGIN

  Packed: TYPE = LONG CARDINAL;
  Unpacked: TYPE = TimeDefs.UnpackedTime;

  Current: PROCEDURE RETURNS [time: LONG CARDINAL]; -- unit is seconds

  Unpack: PROCEDURE [time: LONG CARDINAL ← 0] RETURNS [unpacked: Unpacked];
  Invalid: ERROR;
  Pack: PROCEDURE [unpacked: Unpacked, computeDST: BOOLEAN ← TRUE]
    RETURNS [time: LONG CARDINAL];
  Append: PROCEDURE [s: STRING, unpacked: Unpacked, zone: BOOLEAN ← FALSE];
  -- 12-JAN-77 12:34:56 PST

  AppendCurrent: PROCEDURE [s: STRING, zone: BOOLEAN ← FALSE] = INLINE
    BEGIN Append[s: s, unpacked: Unpack[0], zone: zone] END;


  END...