View Single Post
  #2  
Old 20-04-2003, 21:47
Xzorg6's Avatar
Xzorg6 Xzorg6 is offline
Wolf & Raven
 
Join Date: 01-04-2003
Location: Evreux
Age: 38
Posts: 11
Il me semble que ce soit ca pour Delphi :

function 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;
Dec(t, d * ticksperday);

h := t div ticksperhour;
Dec(t, h * ticksperhour);

m := t div ticksperminute;
Dec(t, m * ticksperminute);

s := t div tickspersecond;

Result := 'Uptime: ' + IntToStr(d) + ' Days ' + IntToStr(h) + ' Hours ' + IntToStr(m) +
' Minutes ' + IntToStr(s) + ' Seconds';
end;


Jte promet rien

++
Reply With Quote