aio-posix: compute timeout before polling