mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Internal: clang-tidy fixes. No functional change.
This commit is contained in:
+2
-2
@@ -283,12 +283,12 @@ string V3Os::trueRandom(size_t size) {
|
||||
uint64_t V3Os::timeUsecs() {
|
||||
#if defined(_WIN32) || defined(__MINGW32__)
|
||||
// Microseconds between 1601-01-01 00:00:00 UTC and 1970-01-01 00:00:00 UTC
|
||||
static const uint64_t EPOCH_DIFFERENCE_USECS = 11644473600000000ull;
|
||||
static const uint64_t EPOCH_DIFFERENCE_USECS = 11644473600000000ULL;
|
||||
|
||||
FILETIME ft; // contains number of 0.1us intervals since the beginning of 1601 UTC.
|
||||
GetSystemTimeAsFileTime(&ft);
|
||||
uint64_t us
|
||||
= ((static_cast<uint64_t>(ft.dwHighDateTime) << 32) + ft.dwLowDateTime + 5ull) / 10ull;
|
||||
= ((static_cast<uint64_t>(ft.dwHighDateTime) << 32) + ft.dwLowDateTime + 5ULL) / 10ULL;
|
||||
return us - EPOCH_DIFFERENCE_USECS;
|
||||
#else
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init)
|
||||
|
||||
Reference in New Issue
Block a user