Introduce mock timer to reduce test flakiness