Commit 1245e93b authored by Devon H. O'Dell's avatar Devon H. O'Dell Committed by Rob Pike

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
parent 77f6f166
......@@ -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)) }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment