Communauté Informatique NDFR.net : Durée d'exécution de Windows - Programmation (C/C++, Delphi, VB, etc.)
 
Durée d'exécution de Windows
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 20-04-2003, 21:47
Xzorg6's Avatar
Xzorg6 Xzorg6 is offline
Wolf & Raven
 
Join Date: 01-04-2003
Location: Evreux
Age: 39
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
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Présentation de Windows Longhorn Build 4051 (PDC03) Werner Articles 155 22-12-2005 00:29
Mise à jour de la sécurité pour tous les Windows Werner Actualité 5 14-04-2004 00:11
Windows 2000 Advanced Server VS Windows Server 2003 Werner Articles 7 02-07-2003 23:35
Windows .NET 2003 Werner Articles 0 19-10-2002 15:10
Paramétrer et configurer les services de Windows XP Werner Articles 0 16-10-2002 19:07

All times are GMT +2. The time now is 08:18.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.