//// Prototypes
////
-void calc_search_times(const int myTime, const int myInc, const int movesToGo, const int currentPly, int &minimumSearchTime, int &maximumSearchTime);
+class TimeManager {
+public:
-#endif // !defined(SEARCH_H_INCLUDED)
+ void init(int myTime, int myInc, int movesToGo, int currentPly);
+ void pv_unstability(int curChanges, int prevChanges);
+ int available_time() const { return optimumSearchTime + unstablePVExtraTime; }
+ int maximum_time() const { return maximumSearchTime; }
+
+private:
+ int optimumSearchTime;
+ int maximumSearchTime;
+ int unstablePVExtraTime;
+};
+
+#endif // !defined(TIMEMAN_H_INCLUDED)