]> git.sesse.net Git - stockfish/blobdiff - src/timeman.h
Move time related global variables under TimeManager
[stockfish] / src / timeman.h
index c93c6e7d2777144cbeef41b90f4130098da35b31..09bb4af7d185759ae1047e44d346048f07cb27a0 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 update(int myTime, int myInc, int movesToGo, int currentPly);
+  void best_move_changes(int curIter, int prevIter);
+  int available_time() { return optimumSearchTime + extraSearchTime; }
+
+  int optimumSearchTime;
+  int maximumSearchTime;
+  int extraSearchTime;
+};
+
+#endif // !defined(TIMEMAN_H_INCLUDED)