aboutsummaryrefslogtreecommitdiffstats
path: root/src/OutputUHD.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/OutputUHD.cpp')
-rw-r--r--src/OutputUHD.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/OutputUHD.cpp b/src/OutputUHD.cpp
index ad31be7..acc4271 100644
--- a/src/OutputUHD.cpp
+++ b/src/OutputUHD.cpp
@@ -31,6 +31,7 @@
#include "PcDebug.h"
#include "Log.h"
#include "RemoteControl.h"
+#include "Utils.h"
#include <boost/thread/future.hpp>
@@ -349,8 +350,24 @@ int OutputUHD::process(Buffer* dataIn, Buffer* dataOut)
" to " << dataIn->getLength();
throw std::runtime_error("Non-constant input length!");
}
+
+ struct timespec time_before;
+ int time_before_ret = clock_gettime(CLOCK_MONOTONIC, &time_before);
+
mySyncBarrier.get()->wait();
+ struct timespec time_after;
+ int time_after_ret = clock_gettime(CLOCK_MONOTONIC, &time_after);
+
+ if (time_before_ret == 0 and time_after_ret == 0) {
+ etiLog.level(debug) << "Time delta : " <<
+ timespecdiff_us(time_before, time_after) << " us";
+ }
+ else {
+ etiLog.level(error) << "Time delta failed " <<
+ time_before_ret << " " << time_after_ret;
+ }
+
if (!uwd.running) {
worker.stop();
first_run = true;