]> Cypherpunks repositories - gostls13.git/commitdiff
time: mention time resolution in docs
authorqmuntal <quimmuntal@gmail.com>
Mon, 31 Jul 2023 09:00:40 +0000 (11:00 +0200)
committerQuim Muntal <quimmuntal@gmail.com>
Tue, 1 Aug 2023 13:51:01 +0000 (13:51 +0000)
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>

src/time/time.go

index e8aac5999a2d91d7d67ec60becbb9fdb637cd8e5..26872b1c054772f4406fe6a00dc468db72d6e475 100644 (file)
 // 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 (