Skip to content

Commit

Permalink
Refactor remaining time calculation with time.Since
Browse files Browse the repository at this point in the history
  • Loading branch information
bayraktugrul committed Aug 17, 2024
1 parent 132e83c commit 3408a10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (a *app) Await(waitFunc func() bool) error {
if finish {
return nil
}
remaining = a.timeout - time.Now().Sub(start)
remaining = a.timeout - time.Since(start)
if remaining <= 0 {
return fmt.Errorf("condition does not match in %s timeout time", a.timeout)
}
Expand Down

0 comments on commit 3408a10

Please sign in to comment.