29
30
// NewRemoteGate create a new timer gate instance
32
>
rg := &RemoteGateImpl{
33
>
currentTime: time.Time{},
34
>
nextWakeupTime: time.Time{},
35
>
fireCh: make(chan struct{}, 1),
36
>
}
37
>
return rg
38
>
}
39
40
// FireCh return the channel which will be fired when time is up
42
>
return rg.fireCh
43
>
}
44
45
// FireAfter check will the timer get fired after a certain time