Making timer safe against context shutdowns so can run multiple
time-related tests