Re: [gtk-list] Re: Q: automatic function on program startup



> > [...]
> 
> How could I take calculations out of the idle function. I need as much
> CPU as possible, and that doesn't seem a very good place to put them.
> Moreover, I should have to make a mess to do calculations step by step
> on each call.

Invert the problem, and do the windowing update you need in the 
my_special_calc function. 

psuedo-code inside my_special_calc

if (10000 iterations of calculations)
	call window update system
	set iteration counter to zero
else
	add 1 to iteration counter


						B.T



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]