Commit 1379d906 authored by Sameer Ajmani's avatar Sameer Ajmani

time: fix godoc for After and NewTicker.

R=golang-dev, gri, bradfitz, iant
CC=golang-dev, rsc
https://golang.org/cl/5523049
parent a15448d6
......@@ -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
}
......
......@@ -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 {
......
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