void TimeManagement::init(Search::LimitsType& limits, Color us, int ply) {
+ // if we have no time, no need to initialize TM, except for the start time,
+ // which is used by movetime.
+ startTime = limits.startTime;
+ if (limits.time[us] == 0)
+ return;
+
TimePoint moveOverhead = TimePoint(Options["Move Overhead"]);
TimePoint slowMover = TimePoint(Options["Slow Mover"]);
TimePoint npmsec = TimePoint(Options["nodestime"]);
limits.npmsec = npmsec;
}
- startTime = limits.startTime;
-
// Maximum move horizon of 50 moves
int mtg = limits.movestogo ? std::min(limits.movestogo, 50) : 50;