Re: Timing
Mark,
Basically I do not trust your mathematics skills
. You wrote:
> while check_timer() < 4 do --4 miliseconds = 25 Fps.
The rate of 25 frames per second corresponds to 1/25 = 0.040 s, which
is obviously 40 milliseconds per frame!
So I decided to check your performance degradation claim, and it too
seems to be highly exaggerated.
ON a 266 MHz P II machine under Windows I get one million time()
calls in about 0.7 s, less than one *micro*second per call! Even on a
typical 486 system I would not expect more than about 10 microseconds
per time() call. But your 1 to 2 fps performance degradation claim
would imply (at 20 fps) about 5 to 10 *milli*seconds loss. Not bloody
likely! jiri
ps bonus: If you need just a rough, quick timer and, for some reason,
cannot use the time() function the following works:
integer tfm -- ticks from midnight
tfm = peek4u(#46C)
Unfortunately, the tick rate at this location is *not* affected by the
tick_rate() routine, so you are stuck with the standard 18.2 ticks per
second using this shortcut...
|
Not Categorized, Please Help
|
|