From cd7bc33e901ca84efa53dd5a26c837b5918a3b10 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Sat, 27 Jun 2009 14:27:10 +0000 Subject: Improve custom query timing and display: - Amend timing using clock() to timing based on mach_absolute_time() (see revision comment on Google code) - Ensure the time returned is for the requested query and not subsequent helper queries - Use NSNumberFormatter to return a localised "< 0.1 ms" rather than the hardcoded Euro-style "< 0,1 ms" --- Source/CMMCPConnection.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/CMMCPConnection.h') diff --git a/Source/CMMCPConnection.h b/Source/CMMCPConnection.h index cebc3c50..7c6fc4d0 100644 --- a/Source/CMMCPConnection.h +++ b/Source/CMMCPConnection.h @@ -60,7 +60,7 @@ BOOL useKeepAlive; float keepAliveInterval; - int lastQueryExecutionTime; + double lastQueryExecutionTime; NSString *lastQueryErrorMessage; unsigned int lastQueryErrorId; my_ulonglong lastQueryAffectedRows; @@ -106,7 +106,7 @@ - (BOOL) selectDB:(NSString *) dbName; - (CMMCPResult *) queryString:(NSString *) query; - (CMMCPResult *) queryString:(NSString *) query usingEncoding:(NSStringEncoding) encoding; -- (float) lastQueryExecutionTime; +- (double) lastQueryExecutionTime; - (MCPResult *) listDBsLike:(NSString *) dbsName; - (BOOL) checkConnection; - (void) restoreConnectionDetails; -- cgit v1.2.3