```
// Waits for a random time between two durations and sends the current time on
// the returned channel.
func afterBetween(min time.Duration, max time.Duration) <-chan time.Time {
rand := rand.New(rand.NewSource(time.Now().UnixNano()))
d, delta := min, (max - min)
if delta > 0 {
d += time.Duration(rand.Int63n(int64(delta)))
}
return time.After(d) ///After是标准库里的, 返回的是bool
}
```
上面的time.After(d)和 <-chan time.Time 怎么匹配的?
更多评论
嗯, 你是对的, 我看到的是 time.t.After(d)版本, 被误导了
golang的packege和object区分不明显, 只能看源代码才能区分开
#2