Cheers, Ben.use Time::Hires; $avg_num=10; # or whatever $s=time(); #Time::Hires floating-point drop-in $taxis->taxis() for (0..$avg_num); $refresh = (time()-$s)/$avg_num; $refresh = $sensible if ($refresh < $sensible;} while(1) { $start=time(); $taxis->taxis(); do { DoOneEvent( $running ? DONT_WAIT : ALL_EVENTS ); } until (time()-$start > $refresh); }
In reply to Re: Deep recursion in Tk repeat
by benn
in thread Deep recursion in Tk repeat
by polypompholyx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |