mirror of
https://github.com/tim-beatham/smegmesh.git
synced 2024-12-13 18:11:25 +01:00
15 lines
347 B
Go
15 lines
347 B
Go
package timestamp
|
|
|
|
import (
|
|
"github.com/tim-beatham/wgmesh/pkg/ctrlserver"
|
|
"github.com/tim-beatham/wgmesh/pkg/lib"
|
|
)
|
|
|
|
func NewTimestampScheduler(ctrlServer *ctrlserver.MeshCtrlServer) lib.Timer {
|
|
timerFunc := func() error {
|
|
return ctrlServer.MeshManager.UpdateTimeStamp()
|
|
}
|
|
|
|
return *lib.NewTimer(timerFunc, ctrlServer.Conf.KeepAliveTime)
|
|
}
|