Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
Simplify code by using time.Until
Browse files Browse the repository at this point in the history
instead of time.After.
  • Loading branch information
jorinvo committed May 30, 2017
1 parent 5f6b107 commit 72cb1b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func main() {
signal.Notify(sigChan, syscall.SIGALRM)
select {
case <-sigChan:
case <-time.After(next.Sub(now)):
case <-time.After(time.Until(next)):
}

// Replace current process if command is specified
Expand Down

0 comments on commit 72cb1b1

Please sign in to comment.