X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmisc.h;h=246a56a016594bff70e628c360011480c14a5cdf;hp=28bf045255ccd8b6aae115020ce285cc4fafb651;hb=3017e8c60401ecd92468a9ede3368002c4ddd440;hpb=098f645d26675bcf2180b290be77fe64a63de3ae diff --git a/src/misc.h b/src/misc.h index 28bf0452..246a56a0 100644 --- a/src/misc.h +++ b/src/misc.h @@ -28,7 +28,8 @@ #include "types.h" const std::string engine_info(bool to_uci = false); -void prefetch(void* addr); +void timed_wait(WaitCondition&, Lock&, int); +void prefetch(char* addr); void start_logger(bool b); void dbg_hit_on(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; };