X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftimeman.h;h=1c28f7dbe674342af2498d87cd9d223fd909c44d;hp=c93c6e7d2777144cbeef41b90f4130098da35b31;hb=5fc98745c3b72f99337ec1bb3afff22ecd242467;hpb=c0616d773dcb967dad755de74c36937fc5753b63 diff --git a/src/timeman.h b/src/timeman.h index c93c6e7d..1c28f7db 100644 --- a/src/timeman.h +++ b/src/timeman.h @@ -25,6 +25,18 @@ //// 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)