Use a time.Ticker rather than sleeping for repeating timeouts