Practice ยท 1 of 2
Token Bucket on a Fake Clock
Implement TokenBucket (refill proportional to elapsed ms, capped at capacity, floor at consumption time) so the whole battery is deterministic under FixedClock.
Difficulty: advanced
Press Submit to check your solution.
Back to lesson: Practice: Practice: Architecture Mechanics