ensure sleep time greater than zero seconds