rate: add TokenAt and Tokens methods to Limiter.

Rename "now" to "t" in rate functions.
Improve comments in package rate and its test.

Fixes golang/go#50035

Change-Id: Icd84ce85d31ee8298b0814492f0856e1953923c8
Reviewed-on: https://go-review.googlesource.com/c/time/+/423042
Run-TryBot: Sameer Ajmani <sameer@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2 files changed
tree: 27107565d23624db0b5c4421b283b2fad21c206b
  1. rate/
  2. CONTRIBUTING.md
  3. go.mod
  4. LICENSE
  5. PATENTS
  6. README.md
README.md

Go Time

Go Reference

This repository provides supplementary Go time packages.

Download/Install

The easiest way to install is to run go get -u golang.org/x/time. You can also manually git clone the repository to $GOPATH/src/golang.org/x/time.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.

The main issue tracker for the time repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/time:” in the subject line, so it is easy to find.