Go to the source code of this file.
◆ START_TEST()
START_TEST |
( |
TimerResolution |
| ) |
|
Definition at line 10 of file Timer.c.
11{
13 ULONG CurrentResolution;
14 ULONG MinimumResolution;
15 ULONG MaximumResolution;
16 ULONG CurrentResolution2;
17
18
21 &CurrentResolution);
22
23
24
25
26
28
29
30
31
32
34 &MaximumResolution,
35 &CurrentResolution2);
36
37
39
40
41 ok(MinimumResolution >= MaximumResolution,
"MaximumResolution higher than MinimumResolution!\n");
42
43
44 ok_hex(CurrentResolution, CurrentResolution2);
45
46
47
48
49
50
53 &CurrentResolution);
55 printf(
"Current resolution: %lu ; minimum resolution: %lu\n", CurrentResolution, MinimumResolution);
56 ok(CurrentResolution <= MinimumResolution,
"Current resolution: %lu became too high! (minimum resolution: %lu)\n", CurrentResolution, MinimumResolution);
57
60 &CurrentResolution);
62 printf(
"Current resolution: %lu ; maximum resolution: %lu\n", CurrentResolution, MaximumResolution);
63#if 0
64 ok(
abs((
LONG)MaximumResolution - (
LONG)CurrentResolution) < 200,
"Current resolution: %lu became too low! (maximum resolution: %lu)\n", CurrentResolution, MaximumResolution);
65#endif
66
67
70 &CurrentResolution);
71
72
74
75
78 &CurrentResolution);
79
80
82}
#define ok_hex(expression, result)
NTSTATUS NTAPI NtQueryTimerResolution(OUT PULONG MinimumResolution, OUT PULONG MaximumResolution, OUT PULONG ActualResolution)
NTSTATUS NTAPI NtSetTimerResolution(IN ULONG DesiredResolution, IN BOOLEAN SetResolution, OUT PULONG CurrentResolution)
#define STATUS_TIMER_RESOLUTION_NOT_SET