optimize timer loop for #651