aboutsummaryrefslogtreecommitdiff
path: root/src/time
diff options
context:
space:
mode:
authorqmuntal <quimmuntal@gmail.com>2023-07-31 11:00:40 +0200
committerQuim Muntal <quimmuntal@gmail.com>2023-08-01 13:51:01 +0000
commit913874367959f4f18a0299c91593c841e91b6808 (patch)
tree48844bb0c20f1cd252fd80048975e3e4c6be4e17 /src/time
parentbe0e0b06ac53d3d02ea83b479790404057b6f19b (diff)
downloadgo-913874367959f4f18a0299c91593c841e91b6808.tar.gz
go-913874367959f4f18a0299c91593c841e91b6808.zip
time: mention time resolution in docs
Updates #44343 Updates #53824 Change-Id: Ia7234fac4b1b88b3c331328aaa98dc85205e09ba Reviewed-on: https://go-review.googlesource.com/c/go/+/514275 Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
Diffstat (limited to 'src/time')
-rw-r--r--src/time/time.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/time/time.go b/src/time/time.go
index e8aac5999a..26872b1c05 100644
--- a/src/time/time.go
+++ b/src/time/time.go
@@ -76,6 +76,16 @@
// For debugging, the result of t.String does include the monotonic
// clock reading if present. If t != u because of different monotonic clock readings,
// that difference will be visible when printing t.String() and u.String().
+//
+// # Timer Resolution
+//
+// Timer resolution varies depending on the Go runtime, the operating system
+// and the underlying hardware.
+// On Unix, the resolution is approximately 1ms.
+// On Windows, the default resolution is approximately 16ms, but
+// a lower resolution may be requested using [timeBeginPeriod].
+//
+// [timeBeginPeriod]: https://learn.microsoft.com/en-us/windows/win32/api/timeapi/nf-timeapi-timebeginperiod
package time
import (