use thread timer instead of ttimer