• 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: Kai <email@hidden>
  • Date: Sat, 4 Oct 2003 13:46:00 +0200

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.

Ok, it's a very easy solution ... I could also come on it ! :)

Nevertheless thanks !
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.

References: 
 >Re: Elapsed time of a thread (From: Dave Keck <email@hidden>)

  • Prev by Date: Re: Menu validation in Panther
  • Next by Date: Re: Elapsed time of a thread
  • Previous by thread: Re: Elapsed time of a thread
  • Next by thread: Re: Elapsed time of a thread
  • Index(es):
    • Date
    • Thread