mirror of
https://github.com/vapaamies/KolibriOS.git
synced 2025-09-21 02:30:07 +02:00
35 lines
654 B
ObjectPascal
35 lines
654 B
ObjectPascal
program DateTime;
|
|
|
|
uses
|
|
KolibriOS, CRT;
|
|
|
|
var
|
|
SystemDate: TSystemDate;
|
|
SystemTime: TSystemTime;
|
|
CursorPos: TConsolePoint;
|
|
|
|
begin
|
|
ConsoleInit('Date/Time');
|
|
|
|
SetCursorHeight(0);
|
|
SetCursorPos(27, 11);
|
|
Write(
|
|
'System Date and System Time'#10 +
|
|
' '
|
|
);
|
|
CursorPos := GetCursorPos;
|
|
repeat
|
|
SystemDate := GetSystemDate;
|
|
SystemTime := GetSystemTime;
|
|
with SystemDate, SystemTime do
|
|
begin
|
|
Write('%02x.%02x.%02x', Day, Month, Year);
|
|
Write(' - %02x:%02x:%02x', Hours, Minutes, Seconds);
|
|
end;
|
|
SetCursorPos(CursorPos);
|
|
Sleep(50);
|
|
until Escape;
|
|
|
|
ConsoleExit(True);
|
|
end.
|