aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-06-19 10:01:14 +0000
committerBibiko <bibiko@eva.mpg.de>2009-06-19 10:01:14 +0000
commiteb0f2c8d21052c328c5c0f6a04a4410905e5956f (patch)
treefcb3eca759ccf21d89ff22bc3a21672c887301c1 /Source
parent83d961abc1f551a44ca81bb0f8c4281e918c0f5f (diff)
downloadsequelpro-eb0f2c8d21052c328c5c0f6a04a4410905e5956f.tar.gz
sequelpro-eb0f2c8d21052c328c5c0f6a04a4410905e5956f.tar.bz2
sequelpro-eb0f2c8d21052c328c5c0f6a04a4410905e5956f.zip
• fixed: avoid displaying µs for query execution time
- minimum resolution now is set to 0.1ms - display “< 0,1ms” if time is less than minimum resolution
Diffstat (limited to 'Source')
-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]];
}