You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling time.Now() before and after settimeofday always has hasMonotonic set
And time comparisons use the monotonic clock reading, so n2.Before(t1) uses the monotonic clock.
I think what you expect is just use wall clock n2.UnixNano() < t1.UnixNano() for comparison.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
This is my test case
What did you expect to see?
I expected to see the test can pass.
What did you see instead?
when I run
sudo go test
,it failed, the output isThe text was updated successfully, but these errors were encountered: