Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement proper time handling and estimation #199

Open
2 of 4 tasks
PatrickKa opened this issue Dec 15, 2023 · 0 comments
Open
2 of 4 tasks

Implement proper time handling and estimation #199

PatrickKa opened this issue Dec 15, 2023 · 0 comments

Comments

@PatrickKa
Copy link
Contributor

PatrickKa commented Dec 15, 2023

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 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.

To do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant