Keyboard input/Keypress check: Difference between revisions

Line 720:
time.Sleep(500 * time.Millisecond)
}</lang>
You don't need external dependencies to achieve this. You can use a channel and set a timeout on it.
::<lang go>package main
// stackoverflow.com/questions/43965556/how-to-read-a-key-in-go-but-continue-application-if-no-key-pressed-within-x-seco
Anonymous user