-
Notifications
You must be signed in to change notification settings - Fork 201
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
Use Instant (monotonic) time instead of SystemTime #422
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
I like this, thanks! I'll review this week. |
Thanks for the quick reply! I just want to add a bit of context. We use Tarpc to communicate with an embedded device that doesn't have an internal clock. During runtime we update the clock and that may cause RPC timeouts. This PR eliminates the issue. I haven't added any new tests because I couldn't figure out an easy way of mocking the SystemTime for testing. |
17d44d9
to
2d47272
Compare
Sounds like a cool application! Out of curiosity, what are you building? |
2d47272
to
2c93fb7
Compare
We are building X-ray detectors. Tarpc with channels is used for communication between our "microservices" on the detector, while for the public API facing the PC we use Cap'n proto but we still use Tarpc for testing and internal tools. |
c3aa688
to
11e8094
Compare
This continues on the google#367 pull request. Tarpc should use relative time, especially since RPC serialization no longer uses SystemTime but Duration. With this commit Tarpc uses Instant time and on the edges converts Instant time to SystemTime for the Opentelemetry span's. Signed-off-by: Mislav Novakovic <mislav.novakovic@gmail.com>
It should be OK now, I verified it locally. |
Thanks again, I think this is a great change! |
This continues on the #367 pull request.
Tarpc should use relative time, especially since RPC serialization no longer uses SystemTime but Duration.
With this commit Tarpc uses Instant time and on the edges converts Instant time to SystemTime for the Opentelemetry span's.