Merge pull request #1003 from cpunion/fix-sleep

runtime: fix time.Sleep
This commit is contained in:
xushiwei
2025-02-17 06:15:08 +08:00
committed by GitHub

View File

@@ -15,7 +15,7 @@ import (
// Sleep pauses the current goroutine for at least the duration d. // Sleep pauses the current goroutine for at least the duration d.
// A negative or zero duration causes Sleep to return immediately. // A negative or zero duration causes Sleep to return immediately.
func Sleep(d Duration) { func Sleep(d Duration) {
c.Usleep(c.Uint(d.Nanoseconds())) c.Usleep(c.Uint(d.Microseconds()))
} }
// Interface to timers implemented in package runtime. // Interface to timers implemented in package runtime.