x/time/rate: provides a rate limiter.

The rate limiter works with golang.org/x/net/context's cancelation
mechanism: the Wait method blocks until the limiter permits the
operation to proceed or the context is canceled (in which case the
requested rate allocation is remitted for use by other operations).

Co-author: Arkadi Pyuro <arkadi@google.com>

Change-Id: I841db4e61fd169ac119fdc43105a1e16ca97e0a2
Reviewed-on: https://go-review.googlesource.com/16672
Reviewed-by: Russ Cox <rsc@golang.org>
2 files changed
tree: 1dc1157f28e4df00a0c74fab805a55a89a2654c2
  1. rate/
  2. AUTHORS
  3. CONTRIBUTING.md
  4. CONTRIBUTORS
  5. LICENSE
  6. PATENTS
  7. README