@@ -47,7 +47,7 @@ rlc_rx_um_entity::rlc_rx_um_entity(gnb_du_id_t gnb_du_id,
4747void rlc_rx_um_entity::handle_pdu (byte_buffer_slice buf)
4848{
4949 metrics.metrics_add_pdus (1 , buf.length ());
50- auto start = std::chrono::high_resolution_clock ::now ();
50+ auto start = std::chrono::steady_clock ::now ();
5151 pcap.push_pdu (pcap_context, buf);
5252
5353 rlc_um_pdu_header header = {};
@@ -81,8 +81,7 @@ void rlc_rx_um_entity::handle_pdu(byte_buffer_slice buf)
8181 // deliver to upper layer
8282 logger.log_info (" RX SDU. sdu_len={}" , sdu.value ().length ());
8383 metrics.metrics_add_sdus (1 , sdu.value ().length ());
84- auto latency =
85- std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::high_resolution_clock::now () - start);
84+ auto latency = std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::steady_clock::now () - start);
8685 metrics.metrics_add_sdu_latency (latency.count () / 1000 );
8786 upper_dn.on_new_sdu (std::move (sdu.value ()));
8887 // Nothing else to do here ...
@@ -118,7 +117,7 @@ void rlc_rx_um_entity::handle_pdu(byte_buffer_slice buf)
118117 // Do not pass empty SDU to upper layers and continue as normal to maintain state
119118 } else {
120119 logger.log_info (" RX SDU. sn={} sdu_len={}" , header.sn , sdu.value ().length ());
121- auto latency = std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::high_resolution_clock ::now () -
120+ auto latency = std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::steady_clock ::now () -
122121 sdu_info.time_of_arrival );
123122 metrics.metrics_add_sdu_latency (latency.count () / 1000 );
124123 metrics.metrics_add_sdus (1 , sdu.value ().length ());
@@ -282,7 +281,7 @@ bool rlc_rx_um_entity::handle_segment_data_sdu(const rlc_um_pdu_header& header,
282281 // Add new SN to RX window if no segments have been received yet
283282 rlc_rx_um_sdu_info& rx_sdu = rx_window->has_sn (header.sn ) ? (*rx_window)[header.sn ] : ([&]() -> rlc_rx_um_sdu_info& {
284283 rlc_rx_um_sdu_info& sdu = rx_window->add_sn (header.sn );
285- sdu.time_of_arrival = std::chrono::high_resolution_clock ::now ();
284+ sdu.time_of_arrival = std::chrono::steady_clock ::now ();
286285 return sdu;
287286 })();
288287 // Create SDU segment, to be stored later
0 commit comments