aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPStringAdditions.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-06-17 21:59:45 +0000
committerBibiko <bibiko@eva.mpg.de>2009-06-17 21:59:45 +0000
commite1af7c62ee26b33be9ced00561bda8873ada8fc6 (patch)
tree49b41d341b05fa10d0e3ea5a5c41ddc7d915fe95 /Source/SPStringAdditions.m
parent5363acf332619a5fc823ff126363a0b030373f35 (diff)
downloadsequelpro-e1af7c62ee26b33be9ced00561bda8873ada8fc6.tar.gz
sequelpro-e1af7c62ee26b33be9ced00561bda8873ada8fc6.tar.bz2
sequelpro-e1af7c62ee26b33be9ced00561bda8873ada8fc6.zip
• some improvement to speed up queryString:
- caching of delegate && respondsToSelector - use clock() to calculate query's execution time • converting to cString: if utf8 encoding make usage of UTF8String • added to StringAddition to display µs for a timeIntervall
Diffstat (limited to 'Source/SPStringAdditions.m')
-rw-r--r--Source/SPStringAdditions.m6
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"];