From: Brad Fitzpatrick Date: Wed, 28 Aug 2013 18:16:55 +0000 (-0700) Subject: time: add more docs on Sleep X-Git-Tag: go1.2rc2~407 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8159b6901f0f18f213897f27d5bd4806c3e18ee2;p=gostls13.git 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 --- diff --git a/src/pkg/time/sleep.go b/src/pkg/time/sleep.go index 591fa27b09..4f55bebe62 100644 --- a/src/pkg/time/sleep.go +++ b/src/pkg/time/sleep.go @@ -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 {