drivers/timers_win32/timers_win32.c
changeset 591 513f5ec8b628
parent 577 0bb82be64630
child 599 b2d2c3fab094
child 600 7767029937aa
child 605 f91ee161b3a1
--- a/drivers/timers_win32/timers_win32.c	Wed Sep 16 15:18:23 2009 +0200
+++ b/drivers/timers_win32/timers_win32.c	Wed Sep 16 15:19:14 2009 +0200
@@ -25,13 +25,18 @@
 #include <stdlib.h>
 #include <sys/timeb.h>
 
-extern "C"
-{
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include "applicfg.h"
 #include "can_driver.h"
 #include "timer.h"
 #include "timers_driver.h"
+
+#ifdef __cplusplus
 };
+#endif
 
 struct _timeb timebuffer;
 
@@ -142,7 +147,7 @@
 		LARGE_INTEGER liDueTime;
 
 		/* arg 2 of SetWaitableTimer take 100 ns interval */
-		liDueTime.QuadPart = -value;
+		liDueTime.QuadPart = (-1 * value);
 		//printf("SetTimer(%llu)\n", value);
 
 		if (!SetWaitableTimer(timer, &liDueTime, 0, NULL, NULL, FALSE))