Created
December 18, 2017 08:27
-
-
Save syossan27/10f4db98e538120c539bb2d5582b1fe7 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) | |
| stop := make(chan bool) | |
| func (t *Termbox) RefreshRateDraw(ticker *time.Ticker, stop chan bool) { | |
| for { | |
| select { | |
| case <-ticker.C: | |
| t.UpdateData() | |
| t.Draw() | |
| case <-stop: | |
| break | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment