1 | package time |
---|---|
2 | |
3 | type Duration int64 |
4 | |
5 | func Sleep(Duration) |
6 | |
7 | func NewTimer(d Duration) *Timer |
8 | |
9 | type Timer struct { |
10 | C <-chan Time |
11 | } |
12 | |
13 | func (t *Timer) Stop() bool |
14 | |
15 | type Time struct{} |
16 | |
17 | func After(d Duration) <-chan Time |
18 | |
19 | const ( |
20 | Nanosecond Duration = iota // Specific values do not matter here. |
21 | Second |
22 | Minute |
23 | Hour |
24 | ) |
25 |