Re: Calculate the time difference using difftime yields unexpected result
Re: Calculate the time difference using difftime yields unexpected result
- Subject: Re: Calculate the time difference using difftime yields unexpected result
- From: Sherm Pendley <email@hidden>
- Date: Wed, 7 Mar 2007 20:50:08 -0500
On Mar 7, 2007, at 8:28 PM, Alexander Hartner wrote:
NSLog(@"PERIOD : %d",(endTime-startTime));
double period = difftime(endTime,startTime);
NSLog(@"PERIOD DIFF: %d",period);
You're using the wrong format specifier - use "%f" for floats and
doubles.
sherm--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden