can reset timer
parent
7bc229a603
commit
d7241346a8
5
main.go
5
main.go
|
|
@ -59,7 +59,7 @@ func main() {
|
|||
paused := false
|
||||
delim := ':'
|
||||
|
||||
fmt.Println("Quit with 'q', Pause with 'p'")
|
||||
fmt.Println("Quit with 'q', Pause with 'p', Reset with 'r'")
|
||||
|
||||
go func() {
|
||||
last := time.Now()
|
||||
|
|
@ -105,6 +105,9 @@ func main() {
|
|||
case 'p':
|
||||
paused = !paused
|
||||
pause <- paused
|
||||
case 'r':
|
||||
cur = base
|
||||
printTime(&cur, base, &delim, invert)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue