[futurebasic] Re: [FB] Microsecond timer

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 1998 : Group Archive : Group : All Groups

From: Rick Brown <rbrown@...>
Date: Fri, 04 Dec 1998 17:40:40 -0600
> A little bit unrelated to your question, but i found a bug
> with the DELAY statement.
> 
> Try DELAY 16...and then try DELAY 17...
> 
> There is a huuuuge difference of timing.

It seems that DELAY always delays by a certain number of _ticks_, even
though the parameter is in milliseconds.  When you convert 16 ms to
ticks, it comes out to 0.96 ticks, while 17 ms comes out to 1.02 ticks. 
FB probably rounds up to the next highest integer number of ticks, so
"DELAY 16" delays for 1 tick, while "DELAY 17" delays for 2 ticks.  Not
exactly a bug, but there are probably better ways to design it (I'd like
to see FB^3 use the Microsecond timer to implement the DELAY statement).

- Rick