Added asserts to timer_sleep()