Re: gettickcount returns a negative number???
- From: "Ken Halter" <Ken_Halter@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 23 Aug 2005 15:20:28 -0700
"pithhelmet" <pithhelmet@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C546E136-07D9-4B19-AA6B-E69FEE2D9543@xxxxxxxxxxxxxxxx
>
> so why does the API return a negative number?
From....
Platform SDK: Windows System Information - GetTickCount
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/gettickcount.asp
"The elapsed time is stored as a DWORD value. Therefore, the time will wrap
around to zero if the system is run continuously for 49.7 days."
A VB Long will only go half that far without setting it's sign bit. If the
sign bit's set, it shows as a negative number. There should be plenty of
samples around to convert that to a usable number.
--
Ken Halter - MS-MVP-VB - http://www.vbsight.com
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Please keep all discussions in the groups..
.
- References:
- gettickcount returns a negative number???
- From: pithhelmet
- gettickcount returns a negative number???
- Prev by Date: Re: Is XP is shown using the new XP look ?
- Next by Date: Re: gettickcount returns a negative number???
- Previous by thread: gettickcount returns a negative number???
- Next by thread: Re: gettickcount returns a negative number???
- Index(es):
Relevant Pages
|