> So the minimal change to ensure epicsEventWaitWithTimeout() behaves as
> specified (timeout after >=delay) involves a float to int conversion
> like:
>
>> double delay = ...;
>> unsigned ticks = tickRate * delay;
>> ticks += 2;
I'd say it should be
unsigned ticks = ceil(tickRate * delay) + 1
In this way, a delay of 0.0 seconds results in a delay of 0.0 <= delay
<= tickRate, which is probably the desired outcome in this case.
> So the minimal change to ensure epicsEventWaitW ithTimeout( ) behaves as
> specified (timeout after >=delay) involves a float to int conversion
> like:
>
>> double delay = ...;
>> unsigned ticks = tickRate * delay;
>> ticks += 2;
I'd say it should be
unsigned ticks = ceil(tickRate * delay) + 1
In this way, a delay of 0.0 seconds results in a delay of 0.0 <= delay
<= tickRate, which is probably the desired outcome in this case.