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