• 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: Working with dates...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Working with dates...


  • Subject: Re: Working with dates...
  • From: Brendan Younger <email@hidden>
  • Date: Tue, 7 May 2002 16:42:05 -0400

On Tuesday, May 7, 2002, at 03:53 PM, Andrew Baldwin wrote:

What is a quick way to get a date that is a specific number of seconds in the future? I have a thread which consists of a simple while loop and each time I go through the loop I want to sleep the thread for a few seconds so that it is not using as much time as other threads.

Check out NSDate's +dateWithTimeIntervalSinceNow: method. An NSTimeInterval is simply a double-precision float measured in units of seconds. (i.e., 3.14 seconds is 3.14)

Brendan Younger
_______________________________________________
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: 
 >Working with dates... (From: Andrew Baldwin <email@hidden>)

  • Prev by Date: Re: List of delegates
  • Next by Date: Re: Thread and Return key strangeness
  • Previous by thread: Working with dates...
  • Next by thread: Drag & Drop: NSFilenamesPboardType
  • Index(es):
    • Date
    • Thread