Use time.Ticker instead of time.Sleep
Use time.Ticker instead of time.Sleep

Also rearrange the orders of the two select cases, to make it more
obvious about the control flow of the infinite select loop.

Alternatively we can also label the infinite loop and use break in the
context cancellation case, but since it involves label it may or may not
make the code more readable.

fortytw2/leaktest