From c921bafbf60975f14887c39054a2b99d399c89d4 Mon Sep 17 00:00:00 2001 From: Calcitem Date: Thu, 24 Sep 2020 00:34:49 +0800 Subject: [PATCH] =?UTF-8?q?misc.h:=20=E6=B8=85=E7=90=86=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/misc.h | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/misc.h b/src/misc.h index f12ae6c0..9d878b4e 100644 --- a/src/misc.h +++ b/src/misc.h @@ -141,26 +141,4 @@ namespace WinProcGroup void bindThisThread(size_t idx); } -/////////////////////////////////////////////////////////////////////////////// - -using TimePoint = std::chrono::milliseconds::rep; // A value in milliseconds - -static_assert(sizeof(TimePoint) == sizeof(int64_t), "TimePoint should be 64 bits"); - -inline uint64_t rand64() -{ - return static_cast(rand()) ^ - (static_cast(rand()) << 15) ^ - (static_cast(rand()) << 30) ^ - (static_cast(rand()) << 45) ^ - (static_cast(rand()) << 60); -} - -inline uint64_t rand56() -{ - return rand64() << 8; -} - -void start_logger(const std::string &fname); - #endif // #ifndef MISC_H_INCLUDED \ No newline at end of file