Ros2 latency

sir can you, guide me how to check the latency between two different ros2 nodes in two different systems?

Sorry. This seems not related with Develop Tools - cuda-gdb. Please find proper forum to ask.
Thanks !