]> git.sesse.net Git - stockfish/blobdiff - src/thread.h
Set timer to a fixed interval
[stockfish] / src / thread.h
index d3dd18679b2a2b9b143caee5cfab79d166094aea..92f5ed33a168b9742c176055759b01cb78c2c6e7 100644 (file)
@@ -143,9 +143,10 @@ struct MainThread : public Thread {
 };
 
 struct TimerThread : public ThreadBase {
 };
 
 struct TimerThread : public ThreadBase {
-  TimerThread() : msec(0) {}
+  TimerThread() : run(false) {}
   virtual void idle_loop();
   virtual void idle_loop();
-  int msec;
+  bool run;
+  static const int Resolution = 5; // msec between two check_time() calls
 };
 
 
 };