[futurebasic] Re: Speaking of Speed...

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

From: Mike Friedman <friedo@...>
Date: Thu, 18 Dec 1997 22:48:23 -0500 (EST)
On Thu, 18 Dec 1997, 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!
> 

Sure, just time how long it takes for a dummy loop to execute.  I don't
recall if TIMER$ is implimented in FB, I remember it from BASICA....but a
similar effect could be gained by storing the number of ticks since
startup in a variable, doing the loop, and calculating the difference.
You'd see how many ticks it takes to execute the dummy loop, and adjust
your subsequent loops accordingly (simply by making the parameter of the
TO statements a global var)

HTH

   - Mike

> 
> 
> -- 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@...>
>