Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Deep recursion in Tk repeat

by polypompholyx (Chaplain)
on Sep 02, 2003 at 09:28 UTC ( #288273=note: print w/ replies, xml ) Need Help??


in reply to Re: Deep recursion in Tk repeat
in thread Deep recursion in Tk repeat

Thanks: idling away some slack time if taxis returns too quickly seems to do the trick. I knew the sim would take longer with larger numbers of lice, the problem was mostly that with a small population and the simple while loop, the lice looked like they were on amphetamines! The only change I have made is to use...

DoOneEvent( DONT_WAIT ) until Time::HiRes::time-$start > MIN_REFRESH;

Since DoOneEvent() alone frequently takes longer than 20 ms to return, and therefore the sim gets very jerky with small populations.

Thanks again!


Comment on Re: Re: Deep recursion in Tk repeat
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://288273]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (12)
As of 2015-07-30 18:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls