# To subscribers of the xforms list from David Paigen <paigen@heathen.com> :
> # To subscribers of the xforms list from Steve Lamont <spl@ncmir.ucsd.edu> :
{I wrote:]
> > . . . I discovered, with 0.88, that I could then
> > fl_set_idle_delta( 0 ) and the program would go lickety-split.
> > However, with 1.0, fl_set_idle_delta seems to have no effect, the
> > idle routine gets called about 50 time per second no matter what.
> > In version 0.88 it was being run five thousand times per second.
> >
> > Is this a bug? Do I need to do something different in order to use
> > the cpu's idle time?
>
> fl_set_idle_callback() resets the delta value to the default, wiping
> out any delta value you might have set. If you're calling
> fl_set_idle_delta() prior to fl_set_idle_callback(), try swapping the
> order.
I am doing them in the order you suggest. Early on I define
#define ANLY_IDLE_DELAY 100
#define ANLY_CALC_DELAY 10
Then at the beginning of my app I do this:
fl_set_idle_callback( cbIdle, NULL );
fl_set_idle_delta( ANLY_IDLE_DELAY );
Where cbIdle looks like this:
int cbIdle(XEvent *xe, void *vp )
{
if( runthis )
runthis();
}
And the whole thing is started by this:
void gSetIdleRoutine( VOIDFUNCPTR idlefunc )
{
runthis = idlefunc;
if( runthis == NULL )
{
fl_set_idle_delta( ANLY_IDLE_DELAY );
printf( "Set idle delta to %d\n", ANLY_IDLE_DELAY );
}
else
{
fl_set_idle_delta( ANLY_CALC_DELAY );
printf( "Set idle delta to %d\n", ANLY_CALC_DELAY );
}
}
I have looked through the xforms source code and it appears to
be setting the correct value, but I have not stepped through it
with a debugger. Is there anything else that sets the delta
value?
> I'm not sure if you'd call this a bug or a feature. I don't know when
> it was changed, offhand.
I call it a bug. It violates the rule of least astonishment.
Thanks,
-David
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://world.std.com/~xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/
This archive was generated by hypermail 2b29 : Mon Dec 02 2002 - 18:24:56 EST