go/src/time
Damien Neil 5916bc5b57 runtime, time: don't use monotonic clock inside synctest bubbles
Don't include a monotonic time in time.Times created inside
a bubble, to avoid the confusion of different Times using
different monotonic clock epochs.

For #67434

goos: darwin
goarch: arm64
pkg: time
cpu: Apple M1 Pro
         │ /tmp/bench.0 │            /tmp/bench.1            │
         │    sec/op    │   sec/op     vs base               │
Since-10    18.42n ± 2%   18.68n ± 1%       ~ (p=0.101 n=10)
Until-10    18.28n ± 2%   18.46n ± 2%  +0.98% (p=0.009 n=10)
geomean     18.35n        18.57n       +1.20%

Change-Id: Iaf1b80d0a4df52139c5b80d4bde4410ef8a49f2f
Reviewed-on: https://go-review.googlesource.com/c/go/+/657415
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
2025-03-18 10:50:51 -07:00
..
testdata
tzdata
abs_test.go time: optimize time <-> date conversions 2024-07-31 21:29:46 +00:00
embed.go
example_test.go time: add examples for Since, Until, Abs and fix some comments 2024-11-05 17:09:35 +00:00
export_android_test.go
export_test.go
export_windows_test.go
format.go time: optimize quote using byte(c) for ASCII 2025-03-14 15:08:20 -07:00
format_rfc3339.go time: optimize time <-> date conversions 2024-07-31 21:29:46 +00:00
format_test.go time: fix time zone parsing when format includes time zone seconds 2024-07-02 20:01:50 +00:00
genzabbrs.go all: change from sort functions to slices functions where feasible 2024-05-23 01:00:11 +00:00
internal_test.go time: time/internal_test.go remove redundant type conversion 2024-06-03 14:56:37 +00:00
linkname_test.go time: optimize time <-> date conversions 2024-07-31 21:29:46 +00:00
mono_test.go
sleep.go timer: fix Stop link in Timer.Reset doc comment 2024-10-14 21:03:43 +00:00
sleep_test.go runtime,time: use atomic.Int32 for isSending 2024-10-21 21:48:17 +00:00
sys_plan9.go
sys_unix.go
sys_windows.go
tick.go
tick_test.go time: add examples for Since, Until, Abs and fix some comments 2024-11-05 17:09:35 +00:00
time.go runtime, time: don't use monotonic clock inside synctest bubbles 2025-03-18 10:50:51 -07:00
time_test.go runtime, time: don't use monotonic clock inside synctest bubbles 2025-03-18 10:50:51 -07:00
tzdata_test.go
zoneinfo.go time: optimize time <-> date conversions 2024-07-31 21:29:46 +00:00
zoneinfo_abbrs_windows.go time: regenerate zoneinfo_abbrs_windows.go 2024-11-12 18:43:12 +00:00
zoneinfo_android.go
zoneinfo_android_test.go
zoneinfo_goroot.go
zoneinfo_ios.go
zoneinfo_js.go
zoneinfo_plan9.go internal/synctest: new package for testing concurrent code 2024-11-19 19:40:40 +00:00
zoneinfo_read.go internal/synctest: new package for testing concurrent code 2024-11-19 19:40:40 +00:00
zoneinfo_test.go
zoneinfo_unix.go
zoneinfo_unix_test.go
zoneinfo_wasip1.go
zoneinfo_windows.go all: remove unnecessary symbols and add missing symbols 2024-09-09 16:44:45 +00:00
zoneinfo_windows_test.go