+ // Convert from milliseconds to nodes
+ limits.time[us] = TimePoint(availableNodes);
+ limits.inc[us] *= npmsec;
+ limits.npmsec = npmsec;
+ }
+
+ startTime = limits.startTime;
+ optimumTime = maximumTime = std::max(limits.time[us], minThinkingTime);
+
+ const int maxMTG = limits.movestogo ? std::min(limits.movestogo, MoveHorizon) : MoveHorizon;
+
+ // We calculate optimum time usage for different hypothetical "moves to go" values