1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

Update in: 29 December 2020


:
program uptime;

// Cor van Wandelen 23-12-2020
// returns the uptime in days
// Freepascal code, compiles to executable to be used in Windows or Linux

uses
	SysUtils, Classes;

function UpTime: string;
const
  	ticksperday: int64 = 1000 * 60 * 60 * 24;
var
  	t : int64;
  	d : int64;
begin
 	t := GetTickCount64;
  	d := t div ticksperday;
  	UpTime := inttostr(d);
end;

begin
	write(UpTime);
end.
(Visited 113 times, 1 visits today)