Re: Elapsed time of a thread
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.