]> git.sesse.net Git - stockfish/blobdiff - src/thread.cpp
Set timer to a fixed interval
[stockfish] / src / thread.cpp
index 735cc97caef33aaed97c643ffadab1354d5b678c..a6899de9cbff793b9650ac4b30029c72f4ec20b5 100644 (file)
@@ -101,11 +101,11 @@ void TimerThread::idle_loop() {
       mutex.lock();
 
       if (!exit)
       mutex.lock();
 
       if (!exit)
-          sleepCondition.wait_for(mutex, msec ? msec : INT_MAX);
+          sleepCondition.wait_for(mutex, run ? Resolution : INT_MAX);
 
       mutex.unlock();
 
 
       mutex.unlock();
 
-      if (msec)
+      if (run)
           check_time();
   }
 }
           check_time();
   }
 }