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