Created
January 22, 2021 17:55
-
-
Save thomaspoignant/31614124032621b8838509fa54b93224 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ticker = time.NewTicker(3 * time.Second) | |
defer ticker.Stop() // stop the ticker | |
//... | |
case <- ticker.C: | |
// update cache | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment