When rabid threads have to be put to sleep...
When rabid threads have to be put to sleep...
- Subject: When rabid threads have to be put to sleep...
- From: Lloyd Sargent <email@hidden>
- Date: Tue, 17 Jul 2001 20:07:15 -0500
Hey y'all,
I've been using the following code fragment to put a thread to sleep:
[NSThread sleepUntilDate:[[NSDate date] addTimeInterval: 1.00 *
rcnt]];
It seems to be the simplest way of putting a thread to sleep for a
specific period of time... unless I have missed something more obvious.
But only recently have I been worried that I have been missing
something. If I gather correctly, everything is NSDate comes back as an
autoreleased object - so I shouldn't have anything dangling. It just
seems so... odd.
Cheers,
Lloyd
-----
Canna Software Development
"No animals were harmed in the creation of this email, however some
routers suffered painful bumps and bruises."
OS X Release Version - As Good As It Gets!