From b54a768bc63b01475a79426ea519d22217a001c5 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Thu, 18 Jun 2009 08:18:33 +0000 Subject: =?UTF-8?q?=E2=80=A2=20some=20tiny=20improvements=20to=20speed=20u?= =?UTF-8?q?p=20queryString:=20-=20cache=20the=20function=20pointer=20for?= =?UTF-8?q?=20delegate=20willPerformQuery:=20-=20if=20Console=20Log=20wind?= =?UTF-8?q?ow=20is=20NOT=20visible=20suppress=20reloadData=20and=20scrolli?= =?UTF-8?q?ng=20to=20last=20line=20(this=20speeds=20it=20up=20remarkably);?= =?UTF-8?q?=20if=20user=20opens=20the=20Console=20log=20window=20it=20will?= =?UTF-8?q?=20be=20synchronized=20-=20timeIntervall=20for=20execution=20ti?= =?UTF-8?q?me=20will=20be=20divide=20by=20CLOCKS=5FPER=5FSEC=20in=20[NSStr?= =?UTF-8?q?ing=20stringForTimeInterval]=20-=20removed=20for=20utf8=20enc?= =?UTF-8?q?=20in=20cString=20the=20return=20UTF8String=20(no=20significant?= =?UTF-8?q?=20difference)=20=E2=80=A2=20now=20execution=20time=20shows=20o?= =?UTF-8?q?nly=20the=20time=20for=20mysql=5Freal=5Fquery?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPStringAdditions.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Source/SPStringAdditions.m') diff --git a/Source/SPStringAdditions.m b/Source/SPStringAdditions.m index da4380ff..4b74e905 100644 --- a/Source/SPStringAdditions.m +++ b/Source/SPStringAdditions.m @@ -74,10 +74,13 @@ // // Returns a human readable version string of the supplied time interval. // ------------------------------------------------------------------------------- -+ (NSString *)stringForTimeInterval:(float)timeInterval ++ (NSString *)stringForTimeInterval:(float)timeInterval intervalInClocks:(BOOL)inClocks { NSNumberFormatter *numberFormatter = [[[NSNumberFormatter alloc] init] autorelease]; - + + if(inClocks) + timeInterval = timeInterval/CLOCKS_PER_SEC; + [numberFormatter setNumberStyle:NSNumberFormatterDecimalStyle]; if (timeInterval < 0.001) { -- cgit v1.2.3