-
-
Save zakk4223/46c8a5379e9c2c0a7271 to your computer and use it in GitHub Desktop.
Modified CSTimeIntervalBase.m frameTick
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)frameTick | |
{ | |
NSTimeInterval interval; | |
if (self.paused) | |
{ | |
return; | |
} | |
NSDate *newNow = [NSDate date]; | |
if (self.startDate) { | |
interval = -[self.startDate timeIntervalSinceNow]; | |
} else if (self.endDate) { | |
interval = [self.endDate timeIntervalSinceNow]; | |
} | |
self.startDate = newNow; | |
if (interval < 0) | |
{ | |
interval = 0; | |
} | |
self.text = [self.formatter stringFromInterval:interval]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment