From d91bb3317809877fecbbb265680717ce96b49ca8 Mon Sep 17 00:00:00 2001 From: Li Jie Date: Sun, 16 Feb 2025 19:25:59 +0800 Subject: [PATCH] runtime: fix time.Sleep --- runtime/internal/lib/time/sleep.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/internal/lib/time/sleep.go b/runtime/internal/lib/time/sleep.go index 3f5914c2..08c180fa 100644 --- a/runtime/internal/lib/time/sleep.go +++ b/runtime/internal/lib/time/sleep.go @@ -15,7 +15,7 @@ import ( // Sleep pauses the current goroutine for at least the duration d. // A negative or zero duration causes Sleep to return immediately. func Sleep(d Duration) { - c.Usleep(c.Uint(d.Nanoseconds())) + c.Usleep(c.Uint(d.Microseconds())) } // Interface to timers implemented in package runtime.