• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: how to pause
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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>)

  • Prev by Date: Re: DragDropImageView
  • Next by Date: Re: NSBezierPath and affine transforms.
  • Previous by thread: Re: how to pause
  • Next by thread: Re: cocoa-dev digest, Vol 2 #2903 - 15 msgs
  • Index(es):
    • Date
    • Thread