X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fthread.cpp;h=a6899de9cbff793b9650ac4b30029c72f4ec20b5;hp=735cc97caef33aaed97c643ffadab1354d5b678c;hb=a3a0df92a3ed5ce7c98ff596e687d3d6533590c8;hpb=e8f9447b11efd80a01733175c5076db988c45aa9 diff --git a/src/thread.cpp b/src/thread.cpp index 735cc97c..a6899de9 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -101,11 +101,11 @@ void TimerThread::idle_loop() { mutex.lock(); if (!exit) - sleepCondition.wait_for(mutex, msec ? msec : INT_MAX); + sleepCondition.wait_for(mutex, run ? Resolution : INT_MAX); mutex.unlock(); - if (msec) + if (run) check_time(); } }