Index: lib/sanitizer_common/sanitizer_win.cc =================================================================== --- lib/sanitizer_common/sanitizer_win.cc +++ lib/sanitizer_common/sanitizer_win.cc @@ -506,7 +506,18 @@ } u64 MonotonicNanoTime() { - return 0; + static LARGE_INTEGER base, frequency = {0}; + LARGE_INTEGER current, ns; + if (UNLIKELY(frequency.QuadPart == 0)) { + QueryPerformanceFrequency(&frequency); + QueryPerformanceCounter(&base); + CHECK_NE(frequency.QuadPart, 0); + } + QueryPerformanceCounter(¤t); + ns.QuadPart = current.QuadPart - base.QuadPart; + ns.QuadPart *= 1000U * 1000000U; + ns.QuadPart /= frequency.QuadPart; + return ns.QuadPart; } void Abort() {