• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Inserting a task into the run loop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inserting a task into the run loop


  • Subject: Re: Inserting a task into the run loop
  • From: Uli Kusterer <email@hidden>
  • Date: Mon, 23 Mar 2015 01:27:50 +0100

On 23 Mar 2015, at 00:28, Graham Cox <email@hidden> 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 (email@hidden)

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:

This email sent to email@hidden


References: 
 >Inserting a task into the run loop (From: Graham Cox <email@hidden>)
 >Re: Inserting a task into the run loop (From: Kyle Sluder <email@hidden>)
 >Re: Inserting a task into the run loop (From: Graham Cox <email@hidden>)
 >Re: Inserting a task into the run loop (From: Ken Thomases <email@hidden>)
 >Re: Inserting a task into the run loop (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Inserting a task into the run loop
  • Next by Date: Re: Inserting a task into the run loop
  • Previous by thread: Re: Inserting a task into the run loop
  • Next by thread: Re: Inserting a task into the run loop
  • Index(es):
    • Date
    • Thread