diff options
Diffstat (limited to 'Source/SPStringAdditions.m')
-rw-r--r-- | Source/SPStringAdditions.m | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/SPStringAdditions.m b/Source/SPStringAdditions.m index da4380ff..4b74e905 100644 --- a/Source/SPStringAdditions.m +++ b/Source/SPStringAdditions.m @@ -74,10 +74,13 @@ // // Returns a human readable version string of the supplied time interval. // ------------------------------------------------------------------------------- -+ (NSString *)stringForTimeInterval:(float)timeInterval ++ (NSString *)stringForTimeInterval:(float)timeInterval intervalInClocks:(BOOL)inClocks { NSNumberFormatter *numberFormatter = [[[NSNumberFormatter alloc] init] autorelease]; - + + if(inClocks) + timeInterval = timeInterval/CLOCKS_PER_SEC; + [numberFormatter setNumberStyle:NSNumberFormatterDecimalStyle]; if (timeInterval < 0.001) { |