go-waku/waku/v2/timesource/wall.go

27 lines
389 B
Go
Raw Normal View History

2022-12-09 03:08:04 +00:00
package timesource
import (
"context"
"time"
)
2022-12-09 03:08:04 +00:00
type WallClockTimeSource struct {
}
func NewDefaultClock() *WallClockTimeSource {
return &WallClockTimeSource{}
}
func (t *WallClockTimeSource) Now() time.Time {
return time.Now()
}
func (t *WallClockTimeSource) Start(ctx context.Context) error {
2022-12-09 03:08:04 +00:00
// Do nothing
return nil
}
2023-01-06 22:37:57 +00:00
func (t *WallClockTimeSource) Stop() {
2022-12-09 03:08:04 +00:00
// Do nothing
}