diff --git a/hal/src/main/native/sim/HAL.cpp b/hal/src/main/native/sim/HAL.cpp index bcea7329ef5..4064e85c96f 100644 --- a/hal/src/main/native/sim/HAL.cpp +++ b/hal/src/main/native/sim/HAL.cpp @@ -374,7 +374,7 @@ HAL_Bool HAL_Initialize(int32_t timeout, int32_t mode) { ULONG min, max, current; if (NtQueryTimerResolution(&min, &max, ¤t) == 0) { ULONG currentRes; - if (NtSetTimerResolution(desired, TRUE, ¤tRes) == 0) { + if (NtSetTimerResolution(max, TRUE, ¤tRes) == 0) { std::atexit([]() { ULONG currentRes; NtSetTimerResolution(0, FALSE, ¤tRes);