next up previous contents index
Next: GetVerify Up: Functions and Procedures Previous: GetIntVec

GetTime

   

Declaration:

Procedure GetTime (var hour, minute, second, sec100: word) ;

Description:

GetTime returns the system's time. Hour is a on a 24-hour time scale. sec100 is in hundredth of a second.

Errors:

None.

See also:

GetDate, SetTime

Example
Program Example3;
uses Dos;

{ Program to demonstrate the GetTime function. }

Function L0(w:word):string;
var
  s : string;
begin
  Str(w,s);
  if w<10 then
   L0:='0'+s
  else
   L0:=s; 
end;

var
  Hour,Min,Sec,HSec : word;
begin
  GetTime(Hour,Min,Sec,HSec);
  WriteLn('Current time');
  WriteLn(L0(Hour),':',L0(Min),':',L0(Sec));
end.



Michael Van Canneyt
Thu Sep 10 13:59:33 CEST 1998