Skip to content

Glossary: Go Beyond the Basics

time.After / time.NewTicker

Also written: time.After, time.NewTicker

`time.After(d)` gives a channel that receives once after `d`, and `time.NewTicker(d)` gives one that receives every `d`. Both are used in `select`.

Where the book teaches it

Related terms

timeouttickerselect