diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-01-17 11:30:17 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-01-17 11:30:44 +0100 |
commit | 7ca7edbc5a80b3869fb0772946c00c76c264da8d (patch) | |
tree | f9b8fabd56fe422d637475b882e50982027d524d /src/output/SDR.h | |
parent | 4f7636694a752fa8c652c684a3c9ebf1488ceaa4 (diff) | |
download | dabmod-7ca7edbc5a80b3869fb0772946c00c76c264da8d.tar.gz dabmod-7ca7edbc5a80b3869fb0772946c00c76c264da8d.tar.bz2 dabmod-7ca7edbc5a80b3869fb0772946c00c76c264da8d.zip |
Don't use CLOCK_GETTIME in SDR
Diffstat (limited to 'src/output/SDR.h')
-rw-r--r-- | src/output/SDR.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/output/SDR.h b/src/output/SDR.h index 4c7de5a..a55f7c0 100644 --- a/src/output/SDR.h +++ b/src/output/SDR.h @@ -34,6 +34,7 @@ DESCRIPTION: # include <config.h> #endif +#include <chrono> #include "ModPlugin.h" #include "EtiReader.h" #include "output/SDRDevice.h" @@ -66,14 +67,13 @@ class SDR : public ModOutput, public ModMetadata, public RemoteControllable { const std::string& parameter) const override; private: - void stop(void); void process_thread_entry(void); void handle_frame(struct FrameData &frame); void sleep_through_frame(void); SDRDeviceConfig& m_config; - std::atomic<bool> m_running; + std::atomic<bool> m_running = ATOMIC_VAR_INIT(false); std::thread m_device_thread; std::vector<uint8_t> m_frame; ThreadsafeQueue<FrameData> m_queue; @@ -87,8 +87,8 @@ class SDR : public ModOutput, public ModMetadata, public RemoteControllable { uint32_t last_tx_second = 0; uint32_t last_tx_pps = 0; - struct timespec time_last_frame; - + bool t_last_frame_initialised = false; + std::chrono::steady_clock::time_point t_last_frame; }; } |