X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=ntoskrnl%2Fke%2Fclock.c;h=a9d0c102053cea0057ea325c5945139f94a5df59;hp=a60eabf8a8dd89f0d3de2b2ca96f36caf31d7253;hb=355faf5706d4f1eaecae523e7658c224df0c8c05;hpb=e7ce79fc05c22d4405a0d81d2948b000d10431be diff --git a/ntoskrnl/ke/clock.c b/ntoskrnl/ke/clock.c index a60eabf8a8d..a9d0c102053 100644 --- a/ntoskrnl/ke/clock.c +++ b/ntoskrnl/ke/clock.c @@ -252,8 +252,26 @@ NtSetTimerResolution(IN ULONG DesiredResolution, IN BOOLEAN SetResolution, OUT PULONG CurrentResolution) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + ULONG NewResolution; + + /* Call the internal API */ + NewResolution = ExSetTimerResolution(DesiredResolution, SetResolution); + + /* Return the resolution to the caller */ + _SEH2_TRY + { + ProbeForWriteUlong(CurrentResolution); + *CurrentResolution = NewResolution; + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + _SEH2_YIELD(return _SEH2_GetExceptionCode()); + } + _SEH2_END; + + /* Return success if we set the resolution */ + if (SetResolution) return STATUS_SUCCESS; + else return STATUS_TIMER_RESOLUTION_NOT_SET; } /* EOF */