Removed an unneeded trailing '\' from Windows' START_TIMING.
[claws.git] / src / common / timing.h
index 8a78ea6d095567f5decc275e6c638ec8e3d6245e..f97bfb147d32b955aef9c134ac9cb501028accc8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2005-2007 Colin Leroy <colin@colino.net> & the Claws Mail team
+ * Copyright (C) 2005-2012 Colin Leroy <colin@colino.net> & the Claws Mail team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@
 #include <glib.h>
 #include <sys/time.h>
 #ifdef HAVE_CONFIG_H
-#  include "config.h"
+#include "claws-features.h"
 #endif
 
 #include "utils.h"
 #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 */