timer: add race condition test