]> Cypherpunks repositories - gostls13.git/commitdiff
Update documentation around time.Sleep to specify its precision, and suggest
authorDevon H. O'Dell <devon.odell@gmail.com>
Thu, 24 Dec 2009 21:24:00 +0000 (08:24 +1100)
committerRob Pike <r@golang.org>
Thu, 24 Dec 2009 21:24:00 +0000 (08:24 +1100)
a possible interface for more granular sleep times.

Fixes issue #260.

R=rsc, r
CC=golang-dev
https://golang.org/cl/181058

src/pkg/time/sleep.go

index 79ca3b6ca3d82ee9cbd4891a380ce78fc41c13d2..fe0ddce4a9b4cce5eced1b998f3bee2eaef8dec5 100644 (file)
@@ -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)) }