Fix the sleep time calculation in the kqueue poller.