• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Calculate the time difference using difftime yields unexpected result
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Calculate the time difference using difftime yields unexpected result (From: Alexander Hartner <email@hidden>)

  • Prev by Date: Re: Core Data Help
  • Next by Date: Re: Calculate the time difference using difftime yields unexpected result
  • Previous by thread: Calculate the time difference using difftime yields unexpected result
  • Next by thread: Re: Calculate the time difference using difftime yields unexpected result
  • Index(es):
    • Date
    • Thread