Avoid race condition in stopwatch test