func TestMultithreadedThrottling(t *testing.T) { … } func TestBasicThrottle(t *testing.T) { … } func TestIncrementThrottle(t *testing.T) { … } func TestThrottle(t *testing.T) { … } func TestAlwaysFake(t *testing.T) { … } func TestNeverFake(t *testing.T) { … } func TestWait(t *testing.T) { … } type fakeClock … func newFakeClock() *fakeClock { … } func (fc *fakeClock) Now() time.Time { … } func (fc *fakeClock) Sleep(d time.Duration) { … } func (fc *fakeClock) Since(ts time.Time) time.Duration { … } func TestRatePrecisionBug(t *testing.T) { … }