time: document that Tick interval gap can exceed duration #30271
Labels
Documentation
Issues describing a change to documentation.
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?What did you do?
The documentation example for
time.Tick
( https://golang.org/pkg/time/#Tick ) states that the channel returnsnow
. But if the routine inside the tick exceeds the duration, the ticker produces a one-time gap. This may need clarification in the documentation example. You may check this playground example: https://play.golang.org/p/ImIhZTLYciqWhat did you expect to see?
time.Now()
should be the same asnow
.What did you see instead?
It produces a gap in the second interval:
The text was updated successfully, but these errors were encountered: