Change wakeup timeout to 60s
This commit is contained in:
parent
d0ae646e46
commit
307c9062b4
2 changed files with 3 additions and 3 deletions
|
|
@ -7,7 +7,7 @@ import (
|
|||
"github.com/benbjohnson/clock"
|
||||
)
|
||||
|
||||
const wakeupTimeout = 30 * time.Second
|
||||
const wakeupTimeout = 60 * time.Second
|
||||
|
||||
// Timer measures active time between start and stop events
|
||||
type Timer struct {
|
||||
|
|
|
|||
|
|
@ -16,11 +16,11 @@ func TestTimer(t *testing.T) {
|
|||
|
||||
// start
|
||||
at.Start()
|
||||
clck.Add(20 * time.Second)
|
||||
clck.Add(10 * time.Second)
|
||||
require.Equal(t, at.Expired(), false)
|
||||
|
||||
// wait another 20 sec to expire the timer - this will reset the timer as well
|
||||
clck.Add(20 * time.Second)
|
||||
clck.Add(wakeupTimeout + 10*time.Second)
|
||||
require.Equal(t, at.Expired(), true)
|
||||
|
||||
// start
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue