can reset timer
parent
7bc229a603
commit
d7241346a8
5
main.go
5
main.go
|
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue