From: Devon H. O'Dell Date: Thu, 24 Dec 2009 21:24:00 +0000 (+1100) Subject: Update documentation around time.Sleep to specify its precision, and suggest X-Git-Tag: weekly.2010-01-05~37 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1245e93b2ccee55cf716de03826d50bcf95373e4;p=gostls13.git Update documentation around time.Sleep to specify its precision, and suggest a possible interface for more granular sleep times. Fixes issue #260. R=rsc, r CC=golang-dev https://golang.org/cl/181058 --- diff --git a/src/pkg/time/sleep.go b/src/pkg/time/sleep.go index 79ca3b6ca3..fe0ddce4a9 100644 --- a/src/pkg/time/sleep.go +++ b/src/pkg/time/sleep.go @@ -9,6 +9,7 @@ import ( "syscall" ) -// Sleep pauses the current goroutine for ns nanoseconds. -// It returns os.EINTR if interrupted. +// Sleep pauses the current goroutine for at least ns nanoseconds. Higher resolution +// sleeping may be provided by syscall.Nanosleep on some operating systems. +// Sleep returns os.EINTR if interrupted. func Sleep(ns int64) os.Error { return os.NewSyscallError("sleep", syscall.Sleep(ns)) }