summaryrefslogtreecommitdiffstats
path: root/src/Utils.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-01-17 11:30:17 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-01-17 11:30:44 +0100
commit7ca7edbc5a80b3869fb0772946c00c76c264da8d (patch)
treef9b8fabd56fe422d637475b882e50982027d524d /src/Utils.cpp
parent4f7636694a752fa8c652c684a3c9ebf1488ceaa4 (diff)
downloaddabmod-7ca7edbc5a80b3869fb0772946c00c76c264da8d.tar.gz
dabmod-7ca7edbc5a80b3869fb0772946c00c76c264da8d.tar.bz2
dabmod-7ca7edbc5a80b3869fb0772946c00c76c264da8d.zip
Don't use CLOCK_GETTIME in SDR
Diffstat (limited to 'src/Utils.cpp')
-rw-r--r--src/Utils.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp
index f113be3..b4816d3 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -3,7 +3,7 @@
Her Majesty the Queen in Right of Canada (Communications Research
Center Canada)
- Copyright (C) 2017
+ Copyright (C) 2018
Matthias P. Braendli, matthias.braendli@mpb.li
http://opendigitalradio.org
@@ -215,16 +215,16 @@ double parseChannel(const std::string& chan)
return freq;
}
-int transmission_frame_duration_ms(unsigned int dabMode)
+std::chrono::milliseconds transmission_frame_duration(unsigned int dabmode)
{
- switch (dabMode) {
- case 1: return 96;
- case 2: return 24;
- case 3: return 24;
- case 4: return 48;
+ using namespace std::chrono;
+ switch (dabmode) {
+ case 1: return milliseconds(96);
+ case 2: return milliseconds(24);
+ case 3: return milliseconds(24);
+ case 4: return milliseconds(48);
default:
throw std::runtime_error("invalid DAB mode");
}
}
-