X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftimeman.cpp;h=b8f839637ce2ef868a2d409e62c93faaddbfa5dd;hp=d545269ca31a963a39df29fef6614f707e720a59;hb=55bd27b8f08a151128d7065fa2819aa3e9605299;hpb=cc2b3ece5c5d8d1183f8526fbb0ee4e1ea7a69fe diff --git a/src/timeman.cpp b/src/timeman.cpp index d545269c..b8f83963 100644 --- a/src/timeman.cpp +++ b/src/timeman.cpp @@ -111,15 +111,15 @@ void TimeManager::init(const Search::LimitsType& limits, int currentPly, Color u // Initialize to maximum values but unstablePVExtraTime that is reset unstablePVExtraTime = 0; - optimumSearchTime = maximumSearchTime = limits.times[us]; + optimumSearchTime = maximumSearchTime = limits.time[us]; // We calculate optimum time usage for different hypothetic "moves to go"-values and choose the // minimum of calculated search time values. Usually the greatest hypMTG gives the minimum values. for (hypMTG = 1; hypMTG <= (limits.movestogo ? std::min(limits.movestogo, MoveHorizon) : MoveHorizon); hypMTG++) { // Calculate thinking time for hypothetic "moves to go"-value - hypMyTime = limits.times[us] - + limits.incs[us] * (hypMTG - 1) + hypMyTime = limits.time[us] + + limits.inc[us] * (hypMTG - 1) - emergencyBaseTime - emergencyMoveTime * std::min(hypMTG, emergencyMoveHorizon);