From 6babef7df913dc91066bf1ac8c7a1ad6b43acb3d Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Thu, 26 May 2016 18:45:58 +0200 Subject: Use system time instead of usrp time to print --- src/OutputUHD.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/OutputUHD.cpp') diff --git a/src/OutputUHD.cpp b/src/OutputUHD.cpp index 05d4484..87ea9c3 100644 --- a/src/OutputUHD.cpp +++ b/src/OutputUHD.cpp @@ -749,7 +749,8 @@ void UHDWorker::handle_frame(const struct UHDWorkerFrameData *frame) tx_frame(frame, timestamp_discontinuity); - if (last_usrp_time + 1.0 < usrp_time) { + auto time_now = std::chrono::steady_clock::now(); + if (last_print_time + std::chrono::seconds(1) < time_now) { if (num_underflows or num_late_packets) { etiLog.log(info, "OutputUHD status (usrp time: %f): " @@ -760,7 +761,7 @@ void UHDWorker::handle_frame(const struct UHDWorkerFrameData *frame) num_underflows = 0; num_late_packets = 0; - last_usrp_time = usrp_time; + last_print_time = time_now; } } -- cgit v1.2.3