]> git.sesse.net Git - stockfish/blobdiff - src/timeman.h
Move time related global variables under TimeManager
[stockfish] / src / timeman.h
index 46bc94e157c9fa85b5d48030b31f8dcb8a99b8f2..09bb4af7d185759ae1047e44d346048f07cb27a0 100644 (file)
 //// Prototypes
 ////
 
 //// Prototypes
 ////
 
-void get_search_times(int myTime, int myInc, int movesToGo, int currentPly,
-                      int* optimumSearchTime, int* maximumSearchTime);
+class TimeManager {
+public:
+
+  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)
 
 #endif // !defined(TIMEMAN_H_INCLUDED)