Skip to content

Commit 9138743

Browse files
committed
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 <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Quim Muntal <[email protected]>
1 parent be0e0b0 commit 9138743

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/time/time.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@
7676
// For debugging, the result of t.String does include the monotonic
7777
// clock reading if present. If t != u because of different monotonic clock readings,
7878
// that difference will be visible when printing t.String() and u.String().
79+
//
80+
// # Timer Resolution
81+
//
82+
// Timer resolution varies depending on the Go runtime, the operating system
83+
// and the underlying hardware.
84+
// On Unix, the resolution is approximately 1ms.
85+
// On Windows, the default resolution is approximately 16ms, but
86+
// a lower resolution may be requested using [timeBeginPeriod].
87+
//
88+
// [timeBeginPeriod]: https://learn.microsoft.com/en-us/windows/win32/api/timeapi/nf-timeapi-timebeginperiod
7989
package time
8090

8191
import (

0 commit comments

Comments
 (0)