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)+' Gün '+IntToStr(Hours)+
' Saat '+IntToStr(Min)+' Dakika '+
IntToStr(seconds) +' Saniye ';
end;
Kullanımı

Kod:
Edit1.Text:=Uptime;