fix bug with sleep_handler. added timer interval.
sync sleep with api convention.
added timer interval