ASCIITIM.DEF 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. FOREIGN DEFINITION MODULE AsciiTime;
  2. IMPORT IMPLEMENTATION FROM "asciitime.obj";
  3. (* ========================================================= *)
  4. (* This module converts Time in the structure specified in *)
  5. (* the MODULE SysClock into a printable ascii string. *)
  6. (* There is also a procedure for converting time in the *)
  7. (* "seconds since 1970 " cardinal form, into a DateTime *)
  8. (* structure. *)
  9. (* *)
  10. (* Note : This module is useful in conjunction with the *)
  11. (* the procedures for obtaining the time that are present *)
  12. (* in the UxFiles, and ProgArgs MODULES. *)
  13. (* ========================================================= *)
  14. FROM SysClock IMPORT DateTime;
  15. PROCEDURE StructTimeToAscii(VAR str:ARRAY OF CHAR; time:DateTime);
  16. (*
  17. -- Places ascii representation of 'time' in 'str'. If there is
  18. -- not enough room in 'str' then the representation is truncated
  19. -- as required by the strings length. If there is adequate length
  20. -- then the string is terminated with a null character.
  21. *)
  22. PROCEDURE TimeToStructTime(time : CARDINAL; VAR structTime:DateTime);
  23. (* Converts time cardinals into the structured form. *)
  24. END AsciiTime.