Re: how to pause
Re: how to pause
- Subject: Re: how to pause
- From: "Alastair J.Houghton" <email@hidden>
- Date: Tue, 9 Sep 2003 09:36:20 +0100
On Tuesday, September 9, 2003, at 02:43 am, Gilbert Mackall wrote:
I would like to have a routine pause for some number of seconds. I
have looked at NSTimer and it does not appear to fit what I need. Is
there some other class or routine I could use? Our am I reading the
NSTimer doc's incorrectly?
You shouldn't really be sleeping in the middle of a method called from
your main thread, because it freezes the user interface of your
program, which isn't user-friendly. If you are doing this, then either
split your routine into two (or more) pieces and use NSTimer or
-performSelector:afterDelay:, or move the code to a separate thread, in
which case you can call sleep(), usleep() or nanosleep() as required.
Kind regards,
Alastair.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >how to pause (From: Gilbert Mackall <email@hidden>) |