diff options
Diffstat (limited to 'Source/SPStringAdditions.m')
-rw-r--r-- | Source/SPStringAdditions.m | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/SPStringAdditions.m b/Source/SPStringAdditions.m index def9ce56..da4380ff 100644 --- a/Source/SPStringAdditions.m +++ b/Source/SPStringAdditions.m @@ -80,6 +80,12 @@ [numberFormatter setNumberStyle:NSNumberFormatterDecimalStyle]; + if (timeInterval < 0.001) { + timeInterval = (timeInterval * 1000000); + [numberFormatter setFormat:@"#,##0 µs"]; + + return [numberFormatter stringFromNumber:[NSNumber numberWithFloat:timeInterval]]; + } if (timeInterval < 1) { timeInterval = (timeInterval * 1000); [numberFormatter setFormat:@"#,##0 ms"]; |