Implemented timer_sleep