-
07-09-2009, 10:34 AM #1What's Jailbreak?
- Join Date
- May 2008
- Location
- Pennsylvania
- Posts
- 4
- Thanks
- 0
- Thanked 0 Times in 0 Posts
Converting Raw Seconds to 00:00:00 format
I have an NSTimer that spits out a float value every 1/16th of a second. (Every 1/16th of a second, 1/16 of a second is taken off the float value).
The application functions as a countdown timer, so I want the raw fractional seconds (i.e. 9.9375) to be converted into (hours:minutes:seconds:000).
This is somewhat hard to explain, and I apologize, but right now, I have an NSString that looks like 9.xxxx; my goal is for it to look like 00:00:9
x
x.
If this is possible, I would appreciate some guidance.
Thanks.
________
-
07-12-2009, 10:25 PM #2
I would suggest using NSDateFormatter after creating an NSDate using method dateWithTimeIntervalSinceReferenceDate:



LinkBack URL
About LinkBacks
Reply With Quote