Fixed calculation for how long to sleep for