can reset timer

master
Bel LaPointe 2018-04-09 12:15:32 -06:00
parent 7bc229a603
commit d7241346a8
1 changed files with 4 additions and 1 deletions

View File

@ -59,7 +59,7 @@ func main() {
paused := false paused := false
delim := ':' delim := ':'
fmt.Println("Quit with 'q', Pause with 'p'") fmt.Println("Quit with 'q', Pause with 'p', Reset with 'r'")
go func() { go func() {
last := time.Now() last := time.Now()
@ -105,6 +105,9 @@ func main() {
case 'p': case 'p':
paused = !paused paused = !paused
pause <- paused pause <- paused
case 'r':
cur = base
printTime(&cur, base, &delim, invert)
} }
} }
} }