• 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: perform ... afterDelay?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: perform ... afterDelay?


  • Subject: Re: perform ... afterDelay?
  • From: Andy Armstrong <email@hidden>
  • Date: Wed, 4 Jan 2006 14:10:33 +0000

On 4 Jan 2006, at 14:06, goessly wrote:
In this lists' archives I found the hint to use the following; instead of having to bother with an NSTimers' overhead:
[self performSelector:@selector(someSelector) withObject:nil afterDelay:0.04]


Simplisticly put: (how) can I use that like this:
[self myCounter++  afterDelay:0.04]

How is the counter being used? Do you actually need to increment it every 0.04 seconds or can you just add the appropriate number of ticks based on the elapsed time every time you read it?


If you're literally just incrementing the counter without any side effects then you're wasting a load of cycles and forcing your process to schedule more often than it needs to.

--
Andy Armstrong, hexten.net

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >perform ... afterDelay? (From: goessly <email@hidden>)

  • Prev by Date: perform ... afterDelay?
  • Next by Date: Re: perform ... afterDelay?
  • Previous by thread: perform ... afterDelay?
  • Next by thread: Re: perform ... afterDelay?
  • Index(es):
    • Date
    • Thread