files
SDK/Examples/Console/DateTime/DateTime.dpr
Freeman 9888dd9095 Console API made closest to original one
Extended I/O procedures (CoreLite-like) removed, initial Read/ReadLn procedures added to System unit.
2021-01-18 23:52:16 +03:00

28 lines
494 B
ObjectPascal

program DateTime;
uses
KolibriOS, CRT;
var
CursorXY: TCursorXY;
begin
InitConsole('Date/Time');
CursorOff;
GotoXY(27, 11);
Write(
'System Date and System Time'#10 +
' '
);
CursorXY := WhereXY;
repeat
with GetSystemDate do
con_printf('%02x.%02x.%02x', Day, Month, Year);
with GetSystemTime do
con_printf(' - %02x:%02x:%02x', Hours, Minutes, Seconds);
GotoXY(CursorXY);
Delay(500);
until KeyPressed;
end.