Join one FM-Funknetz talk group from a headset window.
The station reads ~/.funknetz.json, speaks protocol 2.0, and builds an unsigned funknetz.app. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package station
|
||||
|
||||
import "time"
|
||||
|
||||
// Clock is the time source for heartbeats and the retry wait.
|
||||
type Clock interface {
|
||||
Now() time.Time
|
||||
NewTimer(d time.Duration) Timer
|
||||
}
|
||||
|
||||
// Timer is a single deadline. Stop prevents the channel from firing.
|
||||
type Timer interface {
|
||||
C() <-chan time.Time
|
||||
Stop() bool
|
||||
}
|
||||
|
||||
type wallClock struct{}
|
||||
|
||||
func (wallClock) Now() time.Time { return time.Now() }
|
||||
|
||||
func (wallClock) NewTimer(d time.Duration) Timer {
|
||||
if d < 0 {
|
||||
d = 0
|
||||
}
|
||||
return wallTimer{t: time.NewTimer(d)}
|
||||
}
|
||||
|
||||
type wallTimer struct{ t *time.Timer }
|
||||
|
||||
func (w wallTimer) C() <-chan time.Time { return w.t.C }
|
||||
|
||||
func (w wallTimer) Stop() bool { return w.t.Stop() }
|
||||
Reference in New Issue
Block a user