Non-CLOCK_REALTIME counters always use a relative DueTime in NtSetTimer.
However, relative DueTime has to be negative, but the code
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
DueTime.QuadPart = ts + FACTOR;
else /* non-REALTIME clocks require relative DueTime. */
{
- DueTime.QuadPart = ts - get_clock_now ();
+ DueTime.QuadPart = get_clock_now () - ts;
/* If the timestamp was earlier than now, compute number
of overruns and offset DueTime to expire immediately. */
if (DueTime.QuadPart >= 0)