AmirOS: updated the timer handler