Comment 16 for bug 1861612

Revision history for this message
mdavidsaver (mdavidsaver) wrote :

The difference between expected and actual seems ~= epicsThreadSleepQuantum() (aka. 1.0/sysClkRateGet() ). This is the granularity of epicsEventWaitWithTimeout() which is ultimately (I think) what the timer queue is using.

The code in epicsEventWaitWithTimeout() may explain what the -quantum()/2 was doing.

> if (timeOut <= 0.0) {
> ticks = 0;
> } else if (timeOut >= (double) INT_MAX / rate) {
> ticks = WAIT_FOREVER;
> } else {
> ticks = timeOut * rate; // MD - rate=sysClkRateGet()
> if (ticks <= 0)
> ticks = 1;
> }

Previously, subtracting could result in timeOut <=0. Now, this is never the case so the minimum wait is 1 tick.