Call thread_yield() in timer_sleep() if interrupts are on.