Throttler
Runs at most one block per time window, rejecting calls that arrive too soon.
A call outside the window runs its block and returns the value; a call inside the window returns null without running anything. The window starts when a permitted block begins, and a failed or cancelled block still consumes it. Time is measured with the injected TimeSource, which makes the class testable with a virtual clock.
Thread safety: this class is safe for concurrent use from multiple coroutines and threads. run serializes its admission check with a Mutex; reset and isThrottled read or write a single volatile field, so a reset racing an in-progress run may be superseded by that run's new window.
Parameters
the minimum time between the starts of two permitted runs.
the clock used to measure the window.
Throws
if window is negative.