We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 789507a commit 94e88e9Copy full SHA for 94e88e9
1 file changed
livekit-rtc/livekit/rtc/data_track.py
@@ -72,10 +72,6 @@ class DataTrackFrame:
72
user_timestamp: Optional[int] = None
73
"""The frame's user timestamp, if one is associated."""
74
75
- @staticmethod
76
- def _timestamp_now() -> int:
77
- return int(time.time() * 1000)
78
-
79
def with_user_timestamp_now(self) -> DataTrackFrame:
80
"""Associates the current Unix timestamp (in milliseconds) with the frame.
81
@@ -84,7 +80,7 @@ def with_user_timestamp_now(self) -> DataTrackFrame:
84
"""
85
return DataTrackFrame(
86
82
payload=self.payload,
87
- user_timestamp=self._timestamp_now(),
83
+ user_timestamp=int(time.time() * 1000),
88
)
89
90
def duration_since_timestamp(self) -> Optional[float]:
0 commit comments