Avoid timer cancel deadlock, fix build error with timer UT