add TimerInit() and TimerCleanup() in cf_runtime for matching with Timer_unix
authorgreg
Sat, 24 May 2008 11:51:33 +0200
changeset 152 9abf2ac9cb8e
parent 151 43614ea83d2a
child 153 b352a2012691
add TimerInit() and TimerCleanup() in cf_runtime for matching with Timer_unix
plugins/canfestival/cf_runtime.c
--- a/plugins/canfestival/cf_runtime.c	Fri May 23 19:33:17 2008 +0200
+++ b/plugins/canfestival/cf_runtime.c	Sat May 24 11:51:33 2008 +0200
@@ -57,6 +57,9 @@
         setState(&nodename##_Data, Stopped);\
         LeaveMutex();\
         canClose(&nodename##_Data);\
+        #if !defined(WIN32) || defined(__CYGWIN__)\
+        		TimerCleanup();\
+        #endif\
     }
 
 void __cleanup_%(locstr)s()
@@ -70,7 +73,10 @@
 }
 
 #define NODE_OPEN(nodename)\
-    nodename##_Data.preOperational = nodename##_preOperational;\
+	#if !defined(WIN32) || defined(__CYGWIN__)\
+		TimerInit();\
+	#endif\
+	nodename##_Data.preOperational = nodename##_preOperational;\
     if(!canOpen(&nodename##Board,&nodename##_Data)){\
         printf("Cannot open " #nodename " Board (%%s,%%s)\n",nodename##Board.busname, nodename##Board.baudrate);\
         return -1;\