-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add the State set_timestamp function #218
Conversation
As we can see, the python bindings need more attention. I remember that I faced the same issue when I was refactoring tests a few weeks back. We need to decide which time module to use in python and then explicitely bind that to the cpp type. Not 100% sure how to do that though. |
https://pybind11.readthedocs.io/en/stable/advanced/cast/chrono.html The C++ timestamp binds to |
Co-authored-by: domire8 <71256590+domire8@users.noreply.github.com>
…libraries into feature/set-timestamp
Thanks both for checking and correcting, This should be good now |
* Specify nanosecond count since epoch as the integer timestamp representation in state.proto * Add an explicit duration type of nanoseconds to clproto header * Set the timestamp when decoding a message into a State
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this. Now that python bindings and proto with #219 are updated I think it's good to go!
This PR adds the
set_timestamp
function inState
which I would like to use downstream when receiving timed messages. Also, I have realized thetimestamp
uses asteady_clock
which is different to howros
handles time (those would besystem_clock
). I think this is still acceptable as we can convert between the two. But we have to acknowledge that properly.