On 23 Mar 2015, at 00:28, Graham Cox <graham....@bigpond.com> wrote:
> I believe I want my simulation to run "as fast as possible" but because in an 
> idle state a given circuit may simply sit there doing nothing it shouldn't be 
> burning up a lot of processing time as such.

 That sounds like you want an NSTimer with a very high frequency, but then set 
its next fire time to only have it fire when actually needed. That way you 
don’t wake up the CPU (which is bad on a battery-powered Mac) unless you need 
to.

 Alternately, even better would be if you could calculate several simulation 
steps in one go. Then you could limit yourself to the minimal frequency, 
including not simulating anything while your window is obscured or the like, 
and would at busy times only have to run as often as the framerate of the 
screen.

Cheers,
-- Uli Kusterer
“The Witnesses of TeachText are everywhere...”
http://zathras.de


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to