summaryrefslogtreecommitdiffstats
path: root/src/OutputUHD.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-05-26 18:45:58 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-05-26 18:45:58 +0200
commit6babef7df913dc91066bf1ac8c7a1ad6b43acb3d (patch)
tree8cbc610f6cbcc7e17138a179ea792a7bf401261d /src/OutputUHD.cpp
parent607a1c0af18e047f51e6f8f888449a9f2cecd167 (diff)
downloaddabmod-6babef7df913dc91066bf1ac8c7a1ad6b43acb3d.tar.gz
dabmod-6babef7df913dc91066bf1ac8c7a1ad6b43acb3d.tar.bz2
dabmod-6babef7df913dc91066bf1ac8c7a1ad6b43acb3d.zip
Use system time instead of usrp time to print
Diffstat (limited to 'src/OutputUHD.cpp')
-rw-r--r--src/OutputUHD.cpp5
1 files changed, 3 insertions, 2 deletions
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;
}
}