-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 9/29/11 3:06 PM, Tom Hohensee wrote:
> 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.

I don't really follow what you are doing here, but given the original
description of your problem, wouldn't an NSMutableDictionary keyed by
IP be a good choice?  Then you can just add/remove timers as needed
and not have to worry about shifting an array.

If you are trying to get the timers ordered by when they will fire, do
not overlook, e.g., NSDictionary's –keysSortedByValueUsingComparator:.

- -- 
Conrad Shultz

Synthetiq Solutions
www.synthetiqsolutions.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFOhO6raOlrz5+0JdURAoLMAJ4qJwuj5/6riE4jhtc3n6mafOYxdACbBOJP
yUKa53Va5NYPgITcnpJJyPU=
=xa6z
-----END PGP SIGNATURE-----
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to