Use monotonic time util. (#3112)

Thank you @paulwe for doing this. I was promising to do this for a
while, but just like other times, empty promises :-(
This commit is contained in:
Raja Subramanian
2024-10-17 10:49:24 +05:30
committed by GitHub
parent 19c5ed6343
commit 40b10af960
14 changed files with 23 additions and 117 deletions
+1 -7
View File
@@ -27,7 +27,6 @@ import (
"github.com/redis/go-redis/v9"
"gopkg.in/yaml.v3"
"os"
"time"
)
import (
@@ -125,7 +124,6 @@ func InitializeServer(conf *config.Config, currentNode routing.LocalNode) (*Live
if err != nil {
return nil, err
}
time := getTimeNow()
clientConfigurationManager := createClientConfiguration()
client, err := agent.NewAgentClient(messageBus)
if err != nil {
@@ -135,7 +133,7 @@ func InitializeServer(conf *config.Config, currentNode routing.LocalNode) (*Live
timedVersionGenerator := utils.NewDefaultTimedVersionGenerator()
turnAuthHandler := NewTURNAuthHandler(keyProvider)
forwardStats := createForwardStats(conf)
roomManager, err := NewLocalRoomManager(time, conf, objectStore, currentNode, router, roomAllocator, telemetryService, clientConfigurationManager, client, agentStore, rtcEgressLauncher, timedVersionGenerator, turnAuthHandler, messageBus, forwardStats)
roomManager, err := NewLocalRoomManager(conf, objectStore, currentNode, router, roomAllocator, telemetryService, clientConfigurationManager, client, agentStore, rtcEgressLauncher, timedVersionGenerator, turnAuthHandler, messageBus, forwardStats)
if err != nil {
return nil, err
}
@@ -184,10 +182,6 @@ func InitializeRouter(conf *config.Config, currentNode routing.LocalNode) (routi
// wire.go:
func getTimeNow() time.Time {
return time.Now()
}
func getNodeID(currentNode routing.LocalNode) livekit.NodeID {
return livekit.NodeID(currentNode.Id)
}