<div style="font-family: Arial; font-size: 14px;">Hi everyone,</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">According to sd_bus_get_timeout(3) man page, sd_bus_get_timeout() returns "timeout in us to pass to poll()" and it also states that "the returned time-value is relative".</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">However, in reality, this function returns an absolute time point (a-ka relative to the monotonic clock epoch). Hence, the returned value cannot be simply converted to milliseconds and given to poll(). It must first be subtracted from the current monotonic clock time.</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">I followed the documentation and had a bug in my code for some time :) Shall the documentation be updated to mention the necessity of conversion from absolute to relative? Or does sd_bus_get_timeout() have a bug and shall this function do the subtraction for the user and return relative time?</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">Thanks, kind regards,</div><div style="font-family: Arial; font-size: 14px;"><br></div>
<div class="protonmail_signature_block" style="font-family: Arial; font-size: 14px;">
<div class="protonmail_signature_block-user protonmail_signature_block-empty">
</div>
<div class="protonmail_signature_block-proton">Stanislav.</div><div class="protonmail_signature_block-proton"><br></div>
</div>