1
0
mirror of https://github.com/golang/go synced 2024-11-22 00:54:43 -07:00

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
This commit is contained in:
Devon H. O'Dell 2009-12-25 08:24:00 +11:00 committed by Rob Pike
parent 77f6f16660
commit 1245e93b2c

View 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)) }