MCPcopy Create free account
hub / github.com/cryptonomex/graphene / on_current_time_reply_message

Method on_current_time_reply_message

libraries/net/node.cpp:3525–3534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3523 }
3524
3525 void node_impl::on_current_time_reply_message(peer_connection* originating_peer,
3526 const current_time_reply_message& current_time_reply_message_received)
3527 {
3528 VERIFY_CORRECT_THREAD();
3529 fc::time_point reply_received_time = fc::time_point::now();
3530 originating_peer->clock_offset = fc::microseconds(((current_time_reply_message_received.request_received_time - current_time_reply_message_received.request_sent_time) +
3531 (current_time_reply_message_received.reply_transmitted_time - reply_received_time)).count() / 2);
3532 originating_peer->round_trip_delay = (reply_received_time - current_time_reply_message_received.request_sent_time) -
3533 (current_time_reply_message_received.reply_transmitted_time - current_time_reply_message_received.request_received_time);
3534 }
3535
3536 void node_impl::forward_firewall_check_to_next_available_peer(firewall_check_state_data* firewall_check_state)
3537 {

Callers

nothing calls this directly

Calls 1

nowFunction · 0.85

Tested by

no test coverage detected