var
tag: Cardinal = 1000 * 60 * 60 * 24;
stunde: Cardinal = 1000 * 60 * 60;
minute: Cardinal = 1000 * 60;
sekunde: Cardinal = 1000;
function TicksToStr(tc: Cardinal; mitNull: Boolean): string;
var
t, s, m, k: Cardinal;
zd, zh, zm, zs: string;
begin
result := '';
t := tc div tag;
dec(tc, t * tag);
s := tc div stunde;
dec(tc, s * stunde);
m := tc div minute;
dec(tc, m * minute);
k := tc div sekunde;
if t = 1 then zd := '' else zd := 'e';
if s = 1 then zh := '' else zh := 'n';
if m = 1 then zm := '' else zm := 'n';
if k = 1 then zs := '' else zs := 'n';
if mitNull or (t > 0) then
result := result + IntToStr(t) + ' Tag' + zd + #32;
if mitNull or (s > 0) then
result := result + IntToStr(s) + ' Stunde' + zh + #32;
if mitNull or (m > 0) then
result := result + IntToStr(m) + ' Minute' + zm + #32;
if mitNull or (k > 0) then
result := result + IntToStr(k) + ' Sekunde' + zs;
end;
// Beispielaufruf
procedure TForm1.Button2Click(Sender: TObject);
begin
Label1.Caption := TicksToStr(10000, false);
Label2.caption := 'Aktuelle Laufzeit: ' + TicksToStr(GetTickCount, true);
end;