src/timer: fix a compile warning