X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftimeman.h;h=1c28f7dbe674342af2498d87cd9d223fd909c44d;hp=35bcbee7b36b15909c8691e76c04a49a8a3a6442;hb=80bee85d5f48cc1e06f16236a73c86a14c1d0756;hpb=cf0295f1ad2902badeaf9ccf6cb433314465595c diff --git a/src/timeman.h b/src/timeman.h index 35bcbee7..1c28f7db 100644 --- a/src/timeman.h +++ b/src/timeman.h @@ -25,7 +25,18 @@ //// Prototypes //// -void get_search_times(int myTime, int myInc, int movesToGo, int currentPly, - int* maxSearchTime, int* absoluteMaxSearchTime); +class TimeManager { +public: + + 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)