Mail Archives: djgpp/2001/02/17/02:02:38
> From: "Rob Kramer" <robk AT cyberway DOT com DOT sg>
> Newsgroups: comp.os.msdos.djgpp
> Date: Fri, 16 Feb 2001 21:04:40 +0800
>
> Lots of delays and timings yes, but they are all derived from a 5ms Allegro
> timer, which reprograms one of the hardware timer/counters. I use the
> Allegro timer interrupt to add 5 to a global counter, so I have a
> millisecond counter with 5ms precision. All timings are done by using that
> counter. No usleep used.
I don't know enough about Allegro to tell whether its timers can
possibly have such an effect. But that would be the first direction
in which I'd look.
Does Allegro do something to the system clock/timers when the program
exits? If it does, perhaps that could explain why the system clock is
okay once you exit.
You try to invoke some external program that prints the system time
from your program, to see whether the apparent speedup is something
internal to your program or whether the system clock really runs
faster.
> The clock-string written to the screen is directly converted from time(),
> using my own conversion routine (strftime() was not suitable for 'historical
> reasons').
It might be useful to print the unconverted value returned from
time(), and see if it indeed changes at faster rate than it should.
- Raw text -