diff --git a/module/os/windows/spl/spl-time.c b/module/os/windows/spl/spl-time.c index e41151ff7d40..e3ad3668a91a 100644 --- a/module/os/windows/spl/spl-time.c +++ b/module/os/windows/spl/spl-time.c @@ -55,9 +55,12 @@ gethrtime(void) LARGE_INTEGER now; if (start.QuadPart == 0) { start = KeQueryPerformanceCounter(&freq); + ASSERT(freq.QuadPart < NANOSEC); + ASSERT(freq.QuadPart > 0); + freq.QuadPart = NANOSEC / freq.QuadPart; } now = KeQueryPerformanceCounter(NULL); - return (now.QuadPart - start.QuadPart) * (NANOSEC / freq.QuadPart); + return ((now.QuadPart - start.QuadPart) * freq.QuadPart); } /*