[futurebasic] Re: Speaking of Speed...

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

From: Laurie Murphy <president@...>
Date: Fri, 19 Dec 1997 03:00:40 +1000
I'm not sure about checking the speed of the host processor but using the FN
TICKCOUNT routine you can make sure your program doesn't run too fast.

DIM OldCount&
DIM CurrentCount&

do
 OldCount& = FN TICKCOUNT
 ' your program in here.
 do
  CurrentCount& = FN TICKCOUNT
 until CurrentCount& > OldCount&+5

until programends

	I think this should make sure that at least five ticks have past since your
program last looped. Of course you'll need to fix the bug that the counter is
reset at midnight, otherwise this will just freeze at midnight.

P.S. Sorry if this code is wrong. I'm a bit tired and confused at the moment.


Terence Jordan wrote:
> 
> Speaking of Speed, is there a way to do an automatic calculation on how
> fast the host processor is, and automatically adjust your "time-waster"
> loops accordingly? Ie, you'll notice that some games coded for a 25Mhz
> Quadra are pretty unplayable on a G3 because they are too fast.
> 
> Dave, this one's for you!
> 
> -- Terence Jordan (tatewake@...)
> Inspired Software. http://inspired.netstreet.net/
> Macintosh, Dos, Windows, and BeOS software solutions.
> Phone: 407-728-7563
> ............................................
> . New: Renegade Space Ninja for Macintosh! .
> .      Visit our page for more info.       .
> ............................................
> 
> --
> To unsubscribe, send ANY message to <futurebasic-unsubscribe@...>

-- 
____________________________________________________________________
Laurie Murphy		  president@...

Foxchange Productions http://foxchange.com
____________________________________________________________________