Commit 8159b690 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

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
parent 37cee77a
......@@ -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 {
......
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