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, 7 insertions, 3 deletions
diff --git a/Source/SPStringAdditions.m b/Source/SPStringAdditions.m
index 4b74e905..fef2d763 100644
--- a/Source/SPStringAdditions.m
+++ b/Source/SPStringAdditions.m
@@ -83,9 +83,13 @@
[numberFormatter setNumberStyle:NSNumberFormatterDecimalStyle];
- if (timeInterval < 0.001) {
- timeInterval = (timeInterval * 1000000);
- [numberFormatter setFormat:@"#,##0 µs"];
+ if (timeInterval < 0.0001) {
+ return @"< 0,1 ms";
+ }
+
+ if (timeInterval < 0.1) {
+ timeInterval = (timeInterval * 1000);
+ [numberFormatter setFormat:@"#,##0.0 ms"];
return [numberFormatter stringFromNumber:[NSNumber numberWithFloat:timeInterval]];
}