X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmisc.h;h=246a56a016594bff70e628c360011480c14a5cdf;hb=856a5f3aaaf8b9d53599963decacd4476b55c034;hp=9d3c58c87d2859d16a1286155917c1816ec55f84;hpb=8b0fee9998e2ae530fa57e55f6cf145779aef3d0;p=stockfish diff --git a/src/misc.h b/src/misc.h index 9d3c58c8..246a56a0 100644 --- a/src/misc.h +++ b/src/misc.h @@ -28,6 +28,7 @@ #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); @@ -39,16 +40,17 @@ 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; };