Use now for end time (#2248)

* Use now for end time

* less arithmetic
This commit is contained in:
Raja Subramanian
2023-11-17 12:00:47 +05:30
committed by GitHub
parent c62382c76e
commit 8c3ec742e6
+1 -1
View File
@@ -71,7 +71,7 @@ func (s *DataStats) ToProtoActive() *livekit.RTPStats {
return &livekit.RTPStats{
StartTime: timestamppb.New(time.Unix(s.windowStart/1e9, s.windowStart%1e9)),
EndTime: timestamppb.New(time.Now()),
EndTime: timestamppb.New(time.Unix(0, now)),
Duration: float64(duration / 1e9),
Bytes: uint64(s.windowBytes),
Bitrate: float64(s.windowBytes) * 8 / float64(duration) / 1e9,