aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/timer.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-23 15:56:08 +0900
committernsfisis <nsfisis@gmail.com>2026-02-23 15:56:08 +0900
commita97d7d3d47eb8114e2847f643398991677030a55 (patch)
treedfba8a36f6ea653e759be4ddb9e51b20a1bc04f0 /cmd/timer.go
parentc865d2d9d41719e56bc7f6e4eca6078ee402c291 (diff)
downloadterm-clock-a97d7d3d47eb8114e2847f643398991677030a55.tar.gz
term-clock-a97d7d3d47eb8114e2847f643398991677030a55.tar.zst
term-clock-a97d7d3d47eb8114e2847f643398991677030a55.zip
chore: use modern api; go mod tidyHEADmain
Diffstat (limited to 'cmd/timer.go')
-rw-r--r--cmd/timer.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/timer.go b/cmd/timer.go
index 6058839..5f17f3f 100644
--- a/cmd/timer.go
+++ b/cmd/timer.go
@@ -58,10 +58,10 @@ func cmdTimer(cmd *cobra.Command, args []string) {
startTime := time.Now()
- drawTimer(scr, (timerTime - time.Now().Sub(startTime)).Round(time.Second), term.BgStyle, term.FgStyle)
+ drawTimer(scr, (timerTime - time.Since(startTime)).Round(time.Second), term.BgStyle, term.FgStyle)
scr.OnResize(func() bool {
- drawTimer(scr, (timerTime - time.Now().Sub(startTime)).Round(time.Second), term.BgStyle, term.FgStyle)
+ drawTimer(scr, (timerTime - time.Since(startTime)).Round(time.Second), term.BgStyle, term.FgStyle)
return false
})
go scr.DoEventLoop()