]> git.sesse.net Git - stockfish/blobdiff - src/timeman.h
TimeManager API rename
[stockfish] / src / timeman.h
index c93c6e7d2777144cbeef41b90f4130098da35b31..1c28f7dbe674342af2498d87cd9d223fd909c44d 100644 (file)
 //// 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)