Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GetTickCount Question...

Status
Not open for further replies.

GDX

Programmer
Jun 4, 2000
186
US
I am looking to get the uptime for my computer without overflowing the buffer, I heard GetTickCount() returns the number of MilliSeconds a computer is up for, so this is what I did...



secs = GetTickCount() / 6000
mins = secs / 60
Masgbox mins

But this doesnt seem right, does anyone have any ideas?

Gordon R. Durgha
gd@vslink.net
 
You are correct that GetTickCount returns the number of milliseconds since the system was started. There are 1000 milliseconds in a second, so you would want ot replace

secs = GetTickCount()/6000

with

secs = GetTickCount()/1000

Hope this helps.

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top