How do I convert NSTimeInterval into an Integer value?
My TimeInterval holds the value 83.01837. I need to convert it into 83. I have googl
83.01837
83
According to the documentation, NSTimeInterval is just a double:
NSTimeInterval
double
typedef double NSTimeInterval;
You can cast this to an int:
int
seconds = (int) myTimeInterval;
Watch out for overflows, though!