I discovered that TIMER is inaccurate in certain cases. It only happened when using a graphics mode, under DOS on my 486, and under DOS and Windows NT on my Pentium MMX. However the problem was not apparent under Windows 98 on the Pentium MMX, or Windows NT on a Pentium M.
During 30 real seconds, the TIMER function would only count 15-25 seconds.
TIMER inaccuracy on 486/Pentium
Re: TIMER inaccuracy on 486/Pentium
Not really: http://www.freebasic.net/wiki/wikka.php ... KeyPgTimerDamageX wrote:I discovered that TIMER is inaccurate in certain cases.
> During 30 real seconds, the TIMER function would only count 15-25 seconds.
Bad if true. Please supply a complete testcase.
> It only happened when using a graphics mode, under DOS on my 486, and under DOS
> and Windows NT on my Pentium MMX.
> However the problem was not apparent under Windows 98 on the
> Pentium MMX, or Windows NT on a Pentium M.
486 -> no RDTSC available
Windaube NT -> no RDTSC usage ???
Re: TIMER inaccuracy on 486/Pentium
The problem shows up when SCREENLOCK is used. Does SCREENLOCK block interrupts in DOS?
Code: Select all
dim t as double
screen 18,8
do
t=timer
screenlock
locate 1,1,0:? t
screenunlock
loop until inkey$<>""