Re: needed Time for a method
Re: needed Time for a method
- Subject: Re: needed Time for a method
- From: Paul Ferguson <email@hidden>
- Date: Mon, 23 Sep 2002 08:26:18 -0700
Here's a handy function to get millisecond accurate timestamps using
the kernel UpTime() function, which avoids the overhead of NSDate.
#import <DriverServices.h>
unsigned int UpTimeInMilliseconds()
{
unsigned int result;
Nanoseconds n = AbsoluteToNanoseconds(UpTime());
unsigned long long int i = n.hi;
i <<= 32;
i += n.lo;
i /= 1000000;
result = i;
return result;
}
See also the documentation at MP.97.html (search for "UpTime"
documentation in Project Builder) for more code to create very accurate
timestamps.
On Friday, September 20, 2002, at 04:18 PM, Claudius Sailer wrote:
I want to know the time how long a method takes and I found for that
(NSTimeInterval)timestamp
but I can't use it because I am to stupid. How I get the value from
this?
_______________________________________________
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.