Skip to content

Commit 1251421

Browse files
committed
Add timestamps to StreamPlayerGetLag
1 parent bfe0c45 commit 1251421

4 files changed

Lines changed: 853 additions & 827 deletions

File tree

pkg/streamd/client/client.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1973,14 +1973,15 @@ func (c *Client) StreamPlayerGetLag(
19731973
c,
19741974
client.StreamPlayerGetLag,
19751975
&streamd_grpc.StreamPlayerGetLagRequest{
1976-
StreamID: string(streamID),
1976+
RequestUnixNano: time.Now().UnixNano(),
1977+
StreamID: string(streamID),
19771978
},
19781979
)
19791980
})
19801981
if err != nil {
19811982
return 0, time.Time{}, fmt.Errorf("unable to query: %w", err)
19821983
}
1983-
return time.Nanosecond * time.Duration(resp.GetLagU()), unixNanoToTime(resp.GetNowUnixNano()), nil
1984+
return time.Nanosecond * time.Duration(resp.GetLagU()), unixNanoToTime(resp.GetReplyUnixNano()), nil
19841985
}
19851986

19861987
func unixNanoToTime(unixNano int64) time.Time {

0 commit comments

Comments
 (0)