can reset timer
This commit is contained in:
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user