• 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: Elapsed time of a thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Elapsed time of a thread


  • Subject: Re: Elapsed time of a thread
  • From: Dave Keck <email@hidden>
  • Date: Fri, 3 Oct 2003 14:33:44 -0400

Hi,

you can use an NSDate object at the beginning of the thread, and at the end you can access the NSDate instance's timeIntervalSinceNow method:

At the beginning:

NSDate *date = [NSDate date];

At the end:

NSLog(@"%f", [date timeIntervalSinceDate]);

This will print the time in seconds that the thread ran for.

On Friday, October 3, 2003, at 01:24 PM, Kai wrote:

Hi,

I start a new thread with the "detachNewThreadSelector" method and want to know,
how many time (seconds) the thread elapsed !

Is there any way to do this ?

Thx
Kai
_______________________________________________
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.
_______________________________________________
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.

  • Follow-Ups:
    • Re: Elapsed time of a thread
      • From: "Alastair J.Houghton" <email@hidden>
    • Re: Elapsed time of a thread
      • From: Kai <email@hidden>
References: 
 >Elapsed time of a thread (From: Kai <email@hidden>)

  • Prev by Date: Re: NSOpenPanel
  • Next by Date: NSProgressIndicator
  • Previous by thread: Elapsed time of a thread
  • Next by thread: Re: Elapsed time of a thread
  • Index(es):
    • Date
    • Thread