refactoring sleep-timing