mirror of
https://github.com/golang/go
synced 2024-11-22 00:34:40 -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:
parent
77f6f16660
commit
1245e93b2c
@ -9,6 +9,7 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Sleep pauses the current goroutine for ns nanoseconds.
|
// Sleep pauses the current goroutine for at least ns nanoseconds. Higher resolution
|
||||||
// It returns os.EINTR if interrupted.
|
// 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)) }
|
func Sleep(ns int64) os.Error { return os.NewSyscallError("sleep", syscall.Sleep(ns)) }
|
||||||
|
Loading…
Reference in New Issue
Block a user