I have found this question related to chrono time_since_epoch() function.With the answers given in that thread we can achieve timestamping in same machine in multiple platforms. I have two machines which are showing two different time_since_epoch() in microseconds.I need to timestamp a packet sent from one machine to the other machine to calculate the latecy of that packet.
Currently I have used
uint64_t usCurrentTime = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::high_resolution_clock::now().time_since_epoch()).count();
function to get the current time since epoch in microseconds.But the latency is underflowing since I am saving it in uint64_t.This is because both the machines are not in time sync. How can I achieve my need using chrono library functions