Language:
Русский
English
{GetTime.PAS}
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
{Sample code for the GetTime procedure.}
uses WinDos, WinCrt;
var
h, m, s, hund : Word;
function LeadingZero(w : Word) : String;
var
s : String;
begin
Str(w:0,s);
if Length(s) = 1 then
s := '0' + s;
LeadingZero := s;
end;
begin
GetTime(h,m,s,hund);
Writeln('It is now ',LeadingZero(h),':',
LeadingZero(m),':',LeadingZero(s),
'.',LeadingZero(hund));
end.