[Commits] [SCM] claws branch, master, updated. 3.13.2-144-g3b6d06f
ticho at claws-mail.org
ticho at claws-mail.org
Mon May 30 13:01:26 CEST 2016
The branch, master has been updated
via 3b6d06fd7aaa8627d2fc909e6387dca6c35f4dbd (commit)
from 31a9c52a28cdd50188c212be24989f193b2b270b (commit)
Summary of changes:
src/common/timing.h | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
- Log -----------------------------------------------------------------
commit 3b6d06fd7aaa8627d2fc909e6387dca6c35f4dbd
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Mon May 30 12:26:17 2016 +0200
Fixed calculation of timing.h timer for Windows.
diff --git a/src/common/timing.h b/src/common/timing.h
index 73d0a00..61ffa48 100644
--- a/src/common/timing.h
+++ b/src/common/timing.h
@@ -56,23 +56,23 @@
#include <w32lib.h>
/* no {} by purpose */
-#define START_TIMING(str) \
- LARGE_INTEGER frequency; \
- LARGE_INTEGER start; \
- LARGE_INTEGER end; \
- LARGE_INTEGER diff; \
- const char *timing_name=str; \
- QueryPerformanceFrequency (&frequency); \
- QueryPerformanceCounter (&start); \
+#define START_TIMING(str) \
+ LARGE_INTEGER frequency; \
+ LARGE_INTEGER start; \
+ LARGE_INTEGER end; \
+ LARGE_INTEGER diff; \
+ const char *timing_name=str; \
+ QueryPerformanceFrequency (&frequency); \
+ QueryPerformanceCounter (&start); \
-#define END_TIMING() \
- QueryPerformanceCounter (&end); \
- diff.QuadPart = (double) \
- ((end.QuadPart - start.QuadPart) \
- * (double)1000.0/(double)frequency.QuadPart); \
- debug_print("TIMING %s: %ds%03dms\n", \
- timing_name, (unsigned int) (diff.QuadPart / 1000000), \
- (unsigned int) ((diff.QuadPart / 1000) % 1000));
+#define END_TIMING() \
+ QueryPerformanceCounter (&end); \
+ diff.QuadPart = \
+ (end.QuadPart - start.QuadPart) \
+ * 1000000/frequency.QuadPart; \
+ debug_print("TIMING %s: %ds%03dms\n", timing_name, \
+ (unsigned int) (diff.QuadPart / 1000000), \
+ (unsigned int) ((diff.QuadPart / 1000) % 1000));
#else
/* no {} by purpose */
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list