🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.borland-delphi
Article #2152

Re: How do I get the Uptime?

#2152
From: James Muller
Date: Sun, 31 Oct 1999 00:00
45 lines
1904 bytes
"Stephan Marais" <fmarais@idt.net> wrote in message
news:381B8E70.AEB57691@idt.net...
| Hi James,
|
| use
|
| var
|   Tick: DWORD;    // holds the number of milliseconds
| begin
|   {get the number of milliseconds since Windows was started}
|   Tick:= GetTickCount;
|
|   {display the number of milliseconds}
|   Label1.Caption := 'Number of Milliseconds: ' + IntToStr(Tick);
|   Label2.Caption := '';
| end;
|
| You need to include Windows in your uses.
|
| regards
| Stephan
|
| James Muller wrote:
|
| > Hello,
| > I would like to know how you can find the uptime for windows. Im
sure
| > the time windows has been up is stored somewhere I just dunno how
to
| > retrieve it. I am using delphi 5 - Any help would be appreciated!
| >
|

Cheers:)

I cam up with this eventuly:

Var TimeUp:TTime;
Begin
TimeUp:=TimeStampToDateTime(MSecsToTimeStamp(GetTickCount));
Label1.Caption:=TimeToStr(TimeUp);
End;

Cheers
Technical Details
Message-ID: <7vh7hq$o6c$1@supernews.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7vfu7i$n25$1@supernews.com> <381B8E70.AEB57691@idt.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fd817,f50aa3c7b63c57e9
X-Google-Attributes: gidfd817,public
X-Google-Thread: f973d,f50aa3c7b63c57e9
X-Google-Attributes: gidf973d,public
X-Google-Thread: 105ac8,f50aa3c7b63c57e9
X-Google-Attributes: gid105ac8,public
X-Google-Thread: 108b0b,f50aa3c7b63c57e9
X-Google-Attributes: gid108b0b,public
From: "James Muller" <I_want_Spam@btinternet.com>
Subject: Re: How do I get the Uptime?
Date: 1999/10/31
Message-ID: <7vh7hq$o6c$1@supernews.com>
X-Deja-AN: 542696930
References: <7vfu7i$n25$1@supernews.com> <381B8E70.AEB57691@idt.net>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.5600
X-Complaints-To: newsabuse@remarq.com
X-Trace: 941367674 LGTBT6QCLE5FAC3ABC uk25.supernews.com
Organization: RemarQ http://www.remarQ.com
X-MSMail-Priority: Normal
Newsgroups: alt.comp.borland-delphi,alt.comp.lang.borland-delphi,alt.lang.delphi,cern.delphi.general