|author||Bryan C. Mills <firstname.lastname@example.org>||Fri Feb 04 14:43:00 2022 -0500|
|committer||Sameer Ajmani <email@example.com>||Thu Feb 10 22:46:13 2022 +0000|
rate: allow for more timing slop in TestWaitSimple The 'd' constant is intentionally set fairly long to allow for builder jitter; however, dFromDuration previously hard-coded only 1ms of downward timing slop. That slop can be introduced due to time spent between the call to WaitN in the previous runWait and the call to time.Now in the current runWait, and empirically may be a bit larger than 1ms on certain builders (especially the android-amd64-emu builders, which also have more clock drift than many other platforms; see golang/go#42513). In addition, on some BSD platforms the slop in the upward direction may actually be longer than d no matter how generously d is set. That appears to be a platform bug (see golang/go#50189). This change adjusts dFromDuration to round to the nearest d instead of biasing in one direction or the other, and allows an additional factor of slop on the affected BSD platforms. Fixes #44067 Change-Id: Id4c073bee545be2291ad98158d764e19db0160cb Reviewed-on: https://go-review.googlesource.com/c/time/+/383175 Trust: Benny Siegert <firstname.lastname@example.org> Reviewed-by: Sameer Ajmani <email@example.com> Trust: Bryan Mills <firstname.lastname@example.org> Run-TryBot: Bryan Mills <email@example.com> TryBot-Result: Gopher Robot <firstname.lastname@example.org>
This repository provides supplementary Go time packages.
The easiest way to install is to run
go get -u golang.org/x/time. You can also manually git clone the repository to
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.