Simplify sleep time calculation