Re: NSTimer or what?

2017-06-20 Thread Gerriet M. Denkmann
> On 20 Jun 2017, at 16:24, Alastair Houghton > wrote: > > On 20 Jun 2017, at 04:04, Gerriet M. Denkmann wrote: >> > >> 2. some other thing repeatedly about every 0.1 second. > > Personally, I’d choose an API that directly supports repeating timers, so I’d > prefer NSTimer or CFRunLoopTime

Re: NSTimer or what?

2017-06-20 Thread Gerriet M. Denkmann
> On 20 Jun 2017, at 16:24, Alastair Houghton > wrote: > > On 20 Jun 2017, at 04:04, Gerriet M. Denkmann wrote: >> >> macOS 11+ >> >> Some Cocoa app which has to do: >> 1. something a few seconds later > > The main issue here isn’t energy use so much as whether you want to be able > to can

Re: NSTimer or what?

2017-06-20 Thread Alastair Houghton
On 20 Jun 2017, at 04:04, Gerriet M. Denkmann wrote: > > macOS 11+ > > Some Cocoa app which has to do: > 1. something a few seconds later The main issue here isn’t energy use so much as whether you want to be able to cancel the operation. If you need to be able to cancel it before it fires,

Re: NSTimer or what?

2017-06-19 Thread Quincey Morris
On Jun 19, 2017, at 20:04 , Gerriet M. Denkmann wrote: > > What is the most efficient (energy-wise) way to do this: > > NSTimer (with tolerance) > NSRunLoop performSelector:target:argument:order:modes: > NSObject performSelector:withObject:afterDelay: > GCD dispatch_af