optimization timer interrupt

use sorted list to reduce work of handler. The main part of sorting and
comparing are finished by main func