Re: GetTickCount
From: Jeremy Collins (jd.collins_at_ntlworld-not.com)
Date: 01/26/04
- Next message: j.munk_at_XremoveXthisXmaccor.com: "Re: GetTickCount"
- Previous message: Per Larsen: "Re: GetTickCount"
- In reply to: j.munk_at_XremoveXthisXmaccor.com: "GetTickCount"
- Next in thread: j.munk_at_XremoveXthisXmaccor.com: "Re: GetTickCount"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 26 Jan 2004 10:27:01 +0000
j.munk@XremoveXthisXmaccor.com wrote:
> I have a couple of application with some timing based on the "GetTickCount"
> API call. Since this function counts milliseconds since the PC was turned on
> and is a DWord it will roll over every 49.7 days. I would like to check this
> but rather than having my PC to run continously for 49.7 days, I wonder if
> there is anywhere where this number can be changed. I.e. so I can set it
> close and then see what happens with my programs when it rolls over.
Write your own GetTickCount that can return any value
you like, and perhaps use a conditional compile:
{$IFDEF DEBUG}
nRes := MyUtils.GetTickCount;
{$ELSE}
nRes := Windows.GetTickCount;
{$ENDIF}
Your "GetTickCount" could simply return the normal
GetTickCount value plus 48 days.
-- jc Remove the -not from email
- Next message: j.munk_at_XremoveXthisXmaccor.com: "Re: GetTickCount"
- Previous message: Per Larsen: "Re: GetTickCount"
- In reply to: j.munk_at_XremoveXthisXmaccor.com: "GetTickCount"
- Next in thread: j.munk_at_XremoveXthisXmaccor.com: "Re: GetTickCount"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|