1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20:
| function Tprog.UpTime: string; const ticksperday: Integer = 1000 * 60 * 60 * 24; ticksperhour: Integer = 1000 * 60 * 60; ticksperminute: Integer = 1000 * 60; tickspersecond: Integer = 1000; var t: Longword; d, h, m, s: Integer; begin t:=GetTickCount; d:=t div ticksperday; //Zeile 165 Dec(t, d * ticksperday); h:=t div ticksperhour; //Zeile 167 Dec(t, h * ticksperhour); m:=t div ticksperminute; //Zeile 189 Dec(t, m * ticksperminute); s:=t div tickspersecond; //Zeile 171 Result:=IntToStr(d)+' Tage '+IntToStr(h)+' Stunden '+IntToStr(m)+' Minuten '+IntToStr(s)+' Sekunden'; end; |