X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftimeman.h;h=29a92e6df48f05b9dfd00c0745e393cc1b3a7cde;hp=46bc94e157c9fa85b5d48030b31f8dcb8a99b8f2;hb=c9b24c3358a26afdec5e33e369b6192039562971;hpb=fe23c70cf163514620deba3c4ef9a3b8f4ceabb1 diff --git a/src/timeman.h b/src/timeman.h index 46bc94e1..29a92e6d 100644 --- a/src/timeman.h +++ b/src/timeman.h @@ -17,15 +17,23 @@ along with this program. If not, see . */ - #if !defined(TIMEMAN_H_INCLUDED) #define TIMEMAN_H_INCLUDED -//// -//// Prototypes -//// +struct SearchLimits; + +class TimeManager { +public: + + void init(const SearchLimits& limits, int fullMoveNumber); + void pv_instability(int curChanges, int prevChanges); + int available_time() const { return optimumSearchTime + unstablePVExtraTime; } + int maximum_time() const { return maximumSearchTime; } -void get_search_times(int myTime, int myInc, int movesToGo, int currentPly, - int* optimumSearchTime, int* maximumSearchTime); +private: + int optimumSearchTime; + int maximumSearchTime; + int unstablePVExtraTime; +}; #endif // !defined(TIMEMAN_H_INCLUDED)