Refactor Timer sleep API to give the min and max time to sleep