System Delphi

function Uptime: string;
var
count,
days,
min,
hours,
seconds : longint;
begin
Count := GetTickCount();
Count := Count div 1000;
Days := Count div (24 * 3600);
if Days > 0 then
Count := Count - (24 * 3600 * Days);
Hours := Count div 3600;
if Hours > 0 then
Count := Count - (3600 * Hours);
Min := Count div 60;
Seconds := Count mod 60;
Result := IntToStr(Days)+' Days '+IntToStr(Hours)+
' hours '+IntToStr(Min)+' minutes '+
IntToStr(seconds) +' seconds ';
end;
begin
Label1.Caption:=Uptime;
end;