Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Uptime? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: March 22 2003 at 10:37 | IP Logged Quote TonyNo

Is there a way to get system uptime (time since last reboot)?
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: March 24 2003 at 10:33 | IP Logged Quote dhoward

Tony,

Are you interested in time since the machine was last rebooted or time since PowerHome was last restarted?

If time since PowerHome was last restarted, I'll add a function that could return that.  In the meantime, you should be able to do it with a gv and using the STARTUP macro to store the time/date that PowerHome was started.

If you want the time since the machine was last booted, I'll have to do some research to see if there is a Windows API call or something that might be able to return that value. 

Dave.

 

Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
seattlechris
Groupie
Groupie


Joined: June 29 2002
Location: United States
Online Status: Offline
Posts: 49
Posted: March 24 2003 at 10:46 | IP Logged Quote seattlechris

Another approach would be to check the time stamp on one of the files
that windows touches on bootup. That might get messy though, given the
number of windows versions that you support.

I was thinking I could use this on the powerhome screen in
a graphic that says "Congratulations, 8 days since last windows
crash".
Back to Top View seattlechris's Profile Search for other posts by seattlechris
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: March 24 2003 at 22:25 | IP Logged Quote TonyNo

Either of those should work, since I usually reboot Windows every 24 hours and PowerHome is in my Startup folder.

Good ole Win 98!

Here is something I found on the API call...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/gettickcount.asp

Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: March 25 2003 at 17:56 | IP Logged Quote dhoward

Tony,

Thats exactly the same link I came across !!

Ive gone ahead and added a new PowerHome formula function which exposes the gettickcount API call.  The only problem is this function will wrap approximately every 50 days.

Ive also added a new function that will return the uptime of PowerHome itself.

HTH,

Dave.

 

Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: March 25 2003 at 19:45 | IP Logged Quote TonyNo

Awesome, Dave! Thanks!

Oh, no! Only 50 days? For Win 95/98, 50 hours would be a miracle!

Tony

Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum