1
0
mirror of https://github.com/golang/go synced 2024-11-17 14:04:48 -07:00

time: add more docs on Sleep

Merge the comment from runtime/time.goc ("at least")
and also note that negative is okay and won't crash.
I see people going out of their way to avoid passing
a negative value to Sleep.

R=golang-dev, adg, r, alex.brainman
CC=golang-dev
https://golang.org/cl/13271045
This commit is contained in:
Brad Fitzpatrick 2013-08-28 11:16:55 -07:00
parent 37cee77ac6
commit 8159b6901f

View File

@ -4,7 +4,8 @@
package time
// Sleep pauses the current goroutine for the duration d.
// Sleep pauses the current goroutine for at least the duration d.
// A negative or zero duration causes Sleep to return immediately.
func Sleep(d Duration)
func nano() int64 {