aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2024-03-26 11:15:55 +0000
committerGitHub <noreply@github.com>2024-03-26 11:15:55 +0000
commitc59f6d548b16fdbae09986ff7be8e86877c30243 (patch)
tree6f5452a253dce71632509ffcabdcb86bc418f85a
parent3a8971c260e097db5eb1186048425f638db88846 (diff)
parent8eed65ad4c48b271754ff0660bda0aa61a2f8625 (diff)
Merge pull request #3333 from blob1807/change-time-sleep-doc
time.accurate_sleep Windows Doc update
-rw-r--r--core/time/time.odin3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/time/time.odin b/core/time/time.odin
index 10b71ee0d..4807af840 100644
--- a/core/time/time.odin
+++ b/core/time/time.odin
@@ -238,8 +238,9 @@ time_add :: proc "contextless" (t: Time, d: Duration) -> Time {
//
// Accuracy seems to be pretty good out of the box on Linux, to within around 4µs worst case.
// On Windows it depends but is comparable with regular sleep in the worst case.
-// To get the same kind of accuracy as on Linux, have your program call `win32.time_begin_period(1)` to
+// To get the same kind of accuracy as on Linux, have your program call `windows.timeBeginPeriod(1)` to
// tell Windows to use a more accurate timer for your process.
+// Additionally your program should call `windows.timeEndPeriod(1)` once you're done with `accurate_sleep`.
accurate_sleep :: proc "contextless" (d: Duration) {
to_sleep, estimate, mean, m2, count: Duration