Re: Cocoa-dev Digest, Vol 8, Issue 783
Re: Cocoa-dev Digest, Vol 8, Issue 783
- Subject: Re: Cocoa-dev Digest, Vol 8, Issue 783
- From: Gordon Apple <email@hidden>
- Date: Thu, 29 Sep 2011 20:25:22 -0500
- Thread-topic: Cocoa-dev Digest, Vol 8, Issue 783
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