Two gigaseconds #147

Merged
JanX2 merged 30 commits from two-gigaseconds into master 2021-05-06 22:50:26 -04:00
2 changed files with 7 additions and 0 deletions
Showing only changes of commit 642717e405 - Show all commits

View file

@ -24,4 +24,6 @@
{ {
} }
- (NSString * _Nullable)stringForTimeInterval:(NSTimeInterval)timeInterval;
@end @end

View file

@ -31,6 +31,11 @@
NSTimeInterval timeInterval = [object doubleValue]; NSTimeInterval timeInterval = [object doubleValue];
return [self stringForTimeInterval:timeInterval];
}
- (NSString * _Nullable)stringForTimeInterval:(NSTimeInterval)timeInterval;
{
if (isnan(timeInterval)) { return @"NaN"; } if (isnan(timeInterval)) { return @"NaN"; }
if (isinf(timeInterval)) { return @"Inf"; } if (isinf(timeInterval)) { return @"Inf"; }