- *optimumSearchTime = Min(*optimumSearchTime, mTime);
- *maximumSearchTime = Min(*maximumSearchTime, aTime);
+ t1 = minThinkingTime + remaining<OptimumTime>(hypMyTime, hypMTG, currentPly);
+ t2 = minThinkingTime + remaining<MaxTime>(hypMyTime, hypMTG, currentPly);
+
+ optimumSearchTime = Min(optimumSearchTime, t1);
+ maximumSearchTime = Min(maximumSearchTime, t2);