diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-04-11 16:23:17 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-05-03 10:05:48 -0700 |
commit | fe4a53df93fa02403b4ebdbda10b6a18d86efd07 (patch) | |
tree | e42974d7175765827b8afa14aac18681a7732946 /host | |
parent | 46b9293ed29bbeab28d25c23b2b63412dd5eb986 (diff) | |
download | uhd-fe4a53df93fa02403b4ebdbda10b6a18d86efd07.tar.gz uhd-fe4a53df93fa02403b4ebdbda10b6a18d86efd07.tar.bz2 uhd-fe4a53df93fa02403b4ebdbda10b6a18d86efd07.zip |
examples: Fix sleep duration in benchmark_rate
The main thread sleeps while the receiver and transmitter threads are
going on. This fixes the calculated time it takes in single-channel
scenarios.
Diffstat (limited to 'host')
-rw-r--r-- | host/examples/benchmark_rate.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/host/examples/benchmark_rate.cpp b/host/examples/benchmark_rate.cpp index c10a4e4a2..3b5439510 100644 --- a/host/examples/benchmark_rate.cpp +++ b/host/examples/benchmark_rate.cpp @@ -524,7 +524,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ const bool wait_for_multichan = (rx_channel_nums.size() <= 1 and tx_channel_nums.size() <= 1); const int64_t secs = - int64_t(duration + wait_for_multichan ? 0 : INIT_DELAY * 1000); + int64_t(duration + (wait_for_multichan ? 0 : INIT_DELAY * 1000)); const int64_t usecs = int64_t((duration - secs)*1e6); std::this_thread::sleep_for( std::chrono::seconds(secs) + |