X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmisc.h;h=246a56a016594bff70e628c360011480c14a5cdf;hb=856a5f3aaaf8b9d53599963decacd4476b55c034;hp=e3fb6435471510bb80a91304bc0b322fec4ff7ca;hpb=1277a428237eec3299c6606951fac014bb3ef851;p=stockfish diff --git a/src/misc.h b/src/misc.h index e3fb6435..246a56a0 100644 --- a/src/misc.h +++ b/src/misc.h @@ -28,27 +28,29 @@ #include "types.h" const std::string engine_info(bool to_uci = false); +void timed_wait(WaitCondition&, Lock&, int); void prefetch(char* addr); void start_logger(bool b); void dbg_hit_on(bool b); -void dbg_hit_on_c(bool c, bool b); +void dbg_hit_on(bool c, bool b); void dbg_mean_of(int v); void dbg_print(); namespace Time { typedef int64_t point; - point now(); + inline point now() { return system_time_to_msec(); } } template struct HashTable { + HashTable() : table(Size, Entry()) {} Entry* operator[](Key key) { return &table[(uint32_t)key & (Size - 1)]; } private: - std::vector table = std::vector(Size); + std::vector table; };