Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > NSTimeInterval question

NSTimeInterval question
Thread Tools
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
May 23, 2003, 05:06 PM
 
I have two times formatted as strings without associated dates and I want to determine the interval between them. I found lots of info on NSDate and NSCalendarDate and a few references within those to NSTimeInterval, but I haven't been able to find anything on NSTimeInterval directly.

For instance, I have the following times in a text file and I want to get the interval between them (in seconds is fine):

20:15:30
20:25:30

I've scanned them into two variables using NSScanner, but I don't know where to go from there.

thanks,
kman
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
May 23, 2003, 05:27 PM
 
NSTimeInterval is just defined as a double.
But personally, I'd probably just scan the numbers into ints and do the math myself. It's easy, and it's faster than screwing around with NSDates.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:35 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2