Re: creating multiple NSTimers
Re: creating multiple NSTimers
- Subject: Re: creating multiple NSTimers
- From: Gordon Apple <email@hidden>
- Date: Thu, 29 Sep 2011 20:28:09 -0500
- Thread-topic: Re: creating multiple NSTimers
Whoops, didnĀ¹t reset the title. Sorry.
On 9/29/11 8:25 PM, "Gordon Apple" <email@hidden> wrote:
> There must already be an array for the table, so just iterate the array every
> minute or whatever (single repeating timer), compare the times to [NSDate
> date} and start or shut down whatever has not been started or shut down. Much
> easier than trying to manage timers.
>
>
> On 9/29/11 8:06 PM, "email@hidden"
> <email@hidden> wrote:
>
>>> > Perhaps, instead of timers, you use objects that represent one of these
>>> set-top boxes and the time at which they should be shutdown. And instead of
>>> scheduling and managing timer, you manage the domain objects instead. Then,
>>> you have one timer, that checks all of your objects and sees if they should
>>> be shut down.
>>
>>
>> But when re-reading the thread I see this is exactly what John suggested:
>>
>>> > Could you use a single, repeating timer with sufficient resolution for
>>> your purposes and an array or dictionary storing the needed timing state?
>>> Then update state appropriately at each fire of the single timer?"
>
_______________________________________________
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