aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPStringAdditions.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPStringAdditions.m')
-rw-r--r--Source/SPStringAdditions.m10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/SPStringAdditions.m b/Source/SPStringAdditions.m
index fef2d763..114ecf7d 100644
--- a/Source/SPStringAdditions.m
+++ b/Source/SPStringAdditions.m
@@ -74,17 +74,17 @@
//
// Returns a human readable version string of the supplied time interval.
// -------------------------------------------------------------------------------
-+ (NSString *)stringForTimeInterval:(float)timeInterval intervalInClocks:(BOOL)inClocks
++ (NSString *)stringForTimeInterval:(float)timeInterval
{
NSNumberFormatter *numberFormatter = [[[NSNumberFormatter alloc] init] autorelease];
- if(inClocks)
- timeInterval = timeInterval/CLOCKS_PER_SEC;
-
[numberFormatter setNumberStyle:NSNumberFormatterDecimalStyle];
+ // For time periods of less than one millisecond, display a localised "< 0.1 ms"
if (timeInterval < 0.0001) {
- return @"< 0,1 ms";
+ [numberFormatter setFormat:@"< #,##0.0 ms"];
+
+ return [numberFormatter stringFromNumber:[NSNumber numberWithFloat:0.1]];
}
if (timeInterval < 0.1) {