home *** CD-ROM | disk | FTP | other *** search
- { PICS.CLK - Remote Operating System Clock Routines
- Updated 8/24/86 for PICS compatibility by Les Archambault }
-
- { File: NORTC.CLK
- Description: This driver set is designed to support computers without a
- real time clock (RTC). The time and date are maintained in
- 'global_date' which is defined in PICSVAR.INC. It is set to
- 00:00:00 initially during PICS initialization.
- }
-
- procedure GetTAD(var t: tad_array);
- { Return a 6 element integer array of the current system time in
- seconds, minutes, hours, day, month, and year. }
- begin
- clock:=false;
- move(global_date, t, 6)
- end;
-
- procedure SetTAD(var t: tad_array);
- { Set the system time using a 6 element integer array which contains
- seconds, minutes, hours, day, month, and year. }
- begin
- clock:=false;
- move(t, global_date, 6);
- hour_count:=global_date[2]*(600.0*(mhz/4.0));
- end;
-
- procedure tick_a_min;
- { increments global date if no clock is in use}
- begin
- if global_date[1]<60 then global_date[1]:=succ(global_date[1])
- else
- begin
- global_date[1]:=0;
- if global_date[2]<24 then global_date[2]:=succ(global_date[2])
- else global_date[2]:=0;
- end;
- end;
-
- procedure tick_a_sec;
- {increments global date if no clock being used}
- begin
- if global_date[0]<60 then global_date[0]:=succ(global_date[0])
- else
- begin
- global_date[0]:=0;
- tick_a_min;
- end;
- end;
-
- {end of NORTC.CLK}