timer rewrite
import threadbuf