mirror of
https://github.com/tim-beatham/smegmesh.git
synced 2024-12-13 18:11:25 +01:00
650901aba1
Implemented my own two phase map based on vector clocks
17 lines
438 B
Go
17 lines
438 B
Go
package timer
|
|
|
|
import (
|
|
"github.com/tim-beatham/wgmesh/pkg/ctrlserver"
|
|
"github.com/tim-beatham/wgmesh/pkg/lib"
|
|
logging "github.com/tim-beatham/wgmesh/pkg/log"
|
|
)
|
|
|
|
func NewTimestampScheduler(ctrlServer *ctrlserver.MeshCtrlServer) lib.Timer {
|
|
timerFunc := func() error {
|
|
logging.Log.WriteInfof("Updated Timestamp")
|
|
return ctrlServer.MeshManager.UpdateTimeStamp()
|
|
}
|
|
|
|
return *lib.NewTimer(timerFunc, ctrlServer.Conf.KeepAliveTime)
|
|
}
|