[futurebasic] Re: Changing PG Pro's Event timing ?

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

From: Keith Ronnholm <ronnholm@...>
Date: Wed, 11 Feb 1998 11:17:28 -0800
>I've noticed from reading through the PG Pro manual that _OtherNullEvent
>gets passed every tickcount or 1/60 of a second. It's setup in
>....
>I have a function that needs to be called repeatedly a lot quicker than this.
>.....

I use PG and the _otherNullEvent case to access a serial port device to
monitor sensors and do so faster than the 1/60th of second limit in PG.
But I did not change PG's timing.

I execute quite a bit of code on each null event.  Nothing says that you
can only do one thing per null event.  In your case, you could do 40 tasks
each taking 400 µsec and still be done before the next 1/60th of a second.

The trick is not to try to do too much.  I check to see what kind of
processor the users' Mac has, and alter the amount of tasks that are done
each null event so that I don't slow down response time.  PG handles all
the user activity - windows (opening, closing, moving), buttons, menu's
etc.  I want my program to be responsive to those types of user requests,
so I keep my null event tasks shorter than 1/60th of a second.  But why not
use all the time you have?   If the user is doing nothing, then you get
lots of null events, and your code executes continuously.



Cheers,

Keith Ronnholm

Remote Measurement Systems, Inc.
2633 Eastlake Ave. E., Suite 200
Seattle, WA 98102

Phone: (206) 328-2255
Fax: (206) 328-1787
ronnholm@...
http://www.measure.com

A quote from David Pogue, MacWorld, Feb 98 online column:
"When it has nothing else to copy from Apple, Microsoft's work gets random,
unfocused, and bizarre.
(Exhibit A: Windows 98.  We're supposed to look at our hard disk with a Web
browser? Like somebody asked for this?)"