mirror of
https://github.com/livekit/livekit.git
synced 2026-03-30 15:35:41 +00:00
* Fix handling of non-monotonic timestamps Timed version is inspired by Hybrid Clock. We used to have a mixed behavior by using time.Time: * during local comparisons, it does increment monotonically * when deserializing remote timestamps, we lose that attribute So it's possible for two requests to be sent in the same microsecond, and for the latter one to be dropped. To fix that behavior, I'm switching it to keeping timestamps to consolidate that behavior, and accepting multiple updates in the same ms by incrementing ticks. Also using @paulwe's idea of a version generator.