Re: creating multiple NSTimers
Re: creating multiple NSTimers
- Subject: Re: creating multiple NSTimers
- From: Tom Hohensee <email@hidden>
- Date: Thu, 29 Sep 2011 17:06:27 -0500
Yes. What I have worked on is using an array of timers fired sequentially. Each firing of the timer sets up the next one in the array. Each new addition to the array requires invalidating of the active timer and reordering of the array according to times. But i have run into problems when two or more timers are set to fire at the same time.
Tom
On Sep 29, 2011, at 4:51 PM, David Duncan wrote:
> On Sep 29, 2011, at 2:47 PM, Tom Hohensee wrote:
>
>> However, I do not know wether the user will have 1 device or 100 devices. Do I have to setup a finite amount of timers (ultimately having a limit on the number of devices that can be added) or is there a better way? I have googled for a while now trying to find example code but have come up empty (plenty of finite examples). I see there are timer applications out there that seem to handle an infinite number of timers.
>
>
> Have you looked into NSMutableArray?
> --
> David Duncan
>
> _______________________________________________
>
> 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
_______________________________________________
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