NSTimer calculate hours
- by Nic Hubbard
I am using an NSTimer which I have working to show minutes and seconds. But I am confused about the math needed to calculate hours.
I am using:
- (void)updateCounter:(NSTimer *)theTimer {
static int count = 0;
count += 1;
int seconds = count % 60;
int minutes = (count - seconds) / 60;
// Not sure how to calculate hours
…