Re: Time elapsed how-to ?
Re: Time elapsed how-to ?
- Subject: Re: Time elapsed how-to ?
- From: "Erik M. Buck" <email@hidden>
- Date: Mon, 13 May 2002 12:47:33 -0500
NSTimeInterval _myStartTime = [NSDate timeIntervalSinceReferenceDate];
NSTimeInterval _currentTime;
// do something time consuming
_currentTime = [NSDate timeIntervalSinceReferenceDate];
printf("The time it took: %d\n", currentTime - myStartTime);
This has sub-millisecond accuracy.
See also gettimeofday().
----- Original Message -----
From: "Francis bouchard" <email@hidden>
To: "cocoa-dev" <email@hidden>
Sent: Monday, May 13, 2002 11:29 AM
Subject: Time elapsed how-to ?
>
Sorry for the silly question, but I've been looking in the docs for an
hour!
>
If I want to do some performance testing how do I calculate the time
passed
>
during 2point in my program.
>
>
Action 1;
>
Start timer
>
...
>
...
>
...
>
Action x
>
>
Stop timer
>
Compute the time that is took.
>
>
thanks
>
_______________________________________________
>
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.