]> Cypherpunks repositories - gostls13.git/commitdiff
time: fix godoc for After and NewTicker.
authorSameer Ajmani <sameer@golang.org>
Sun, 8 Jan 2012 01:53:53 +0000 (20:53 -0500)
committerSameer Ajmani <sameer@golang.org>
Sun, 8 Jan 2012 01:53:53 +0000 (20:53 -0500)
R=golang-dev, gri, bradfitz, iant
CC=golang-dev, rsc
https://golang.org/cl/5523049

src/pkg/time/sleep.go
src/pkg/time/tick.go

index b4680db2387e9dd008326949e15ad5aa4511d3eb..27820b0eaa76ffbb258c5429d957e03b2604929a 100644 (file)
@@ -41,7 +41,7 @@ func (t *Timer) Stop() (ok bool) {
 }
 
 // NewTimer creates a new Timer that will send
-// the current time on its channel after at least ns nanoseconds.
+// the current time on its channel after at least duration d.
 func NewTimer(d Duration) *Timer {
        c := make(chan Time, 1)
        t := &Timer{
@@ -70,7 +70,7 @@ func sendTime(now int64, c interface{}) {
 
 // After waits for the duration to elapse and then sends the current time
 // on the returned channel.
-// It is equivalent to NewTimer(ns).C.
+// It is equivalent to NewTimer(d).C.
 func After(d Duration) <-chan Time {
        return NewTimer(d).C
 }
index 4440c2207b33715ce54d087051b10ba5547c6121..8c6b9bc3b2a9a84aedb03d8015f5b51983194744 100644 (file)
@@ -14,7 +14,7 @@ type Ticker struct {
 }
 
 // NewTicker returns a new Ticker containing a channel that will send the
-// time, in nanoseconds, with a period specified by the duration argument.
+// time with a period specified by the duration argument.
 // It adjusts the intervals or drops ticks to make up for slow receivers.
 // The duration d must be greater than zero; if not, NewTicker will panic.
 func NewTicker(d Duration) *Ticker {