mts: only set time once initially, then use system clock

Issue #341 resolved
Trek Hopton created an issue

Currently the time that the mts encoder uses to encode timestamps is set every time a http response is received. This can introduce discontinuities where they can be avoided.

Instead, we should only update the time once at the start and then keep track of time using the system clock so that we don’t have network latency involved in keeping the time.

This can be done by checking if the time has been set using the existing Realtime.IsSet() and then only updating the time from the server if it has not been set.

Comments (1)

  1. Log in to comment