You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need a time library that provides functions to get the current Rodos time (= time since last reset) and the estimated real time (= UTC), to store the time in the persistent state, and to update it when a command is received.
I propose a NamedType called Timestamp that is an int32_t under the hood, for all this. Also, the real time offset should be a topic that gets published by the real time thread and used by the functions getting the current real time. However, updating the offset is then nontrivial since topics can only have a single publisher, but the update function also wants to change the offset.
Edit: We use the strong types from #320, and I don't think that we need a topic for things like the time offset if we already store it as a persistent variable and Load() and Store() will be "atomic". Also, I think that the simple functionality of storing the time offset does not need a separate real time thread. We can just do that in the telemetry thread, where we need to touch all persistent variables anyway.
Description
We need a time library that provides functions to get the current Rodos time (= time since last reset) and the estimated real time (= UTC), to store the time in the persistent state, and to update it when a command is received.
I propose aNamedType
calledTimestamp
that is anint32_t
under the hood, for all this. Also, the real time offset should be a topic that gets published by the real time thread and used by the functions getting the current real time. However, updating the offset is then nontrivial since topics can only have a single publisher, but the update function also wants to change the offset.Edit: We use the strong types from #320, and I don't think that we need a topic for things like the time offset if we already store it as a persistent variable and
Load()
andStore()
will be "atomic". Also, I think that the simple functionality of storing the time offset does not need a separate real time thread. We can just do that in the telemetry thread, where we need to touch all persistent variables anyway.To do
The text was updated successfully, but these errors were encountered: