gz-transport
gz-transport copied to clipboard
Throttle based on custom clock
Original report (archived issue) by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).
Summary
It's currently possible to throttle a publisher's update rate by setting the SetMsgsPerSec option. But the implementation is currently always using wall time.
Motivation
It would be useful to be able to throttle based on custom clocks, so a simulator could throttle based on the current simulation time, for example.
Describe alternatives you've considered
Throttling from outside Ignition Transport, preventing the call to Publish
.
Additional context
The Clock class is being used to timestamp logs with custom time. The same class could be used for throttling.