diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-12-18 10:06:07 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-12-18 10:06:07 +0100 |
commit | 5a0633d70a82e15f63a006489ffa1544fa37cb90 (patch) | |
tree | 5bc9ff8c7721a7f15b5fa322d50ebeed51225e9a /src/ClockTAI.h | |
parent | c56781de33a257cc83978132dee0b28e2cbfc719 (diff) | |
download | dabmux-5a0633d70a82e15f63a006489ffa1544fa37cb90.tar.gz dabmux-5a0633d70a82e15f63a006489ffa1544fa37cb90.tar.bz2 dabmux-5a0633d70a82e15f63a006489ffa1544fa37cb90.zip |
Allow user to specify TAI bulletin URLs
Diffstat (limited to 'src/ClockTAI.h')
-rw-r--r-- | src/ClockTAI.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ClockTAI.h b/src/ClockTAI.h index e0dc439..4436ba9 100644 --- a/src/ClockTAI.h +++ b/src/ClockTAI.h @@ -40,6 +40,8 @@ #include <chrono> #include <future> #include <mutex> +#include <string> +#include <vector> #include "RemoteControl.h" // EDI needs to know UTC-TAI, but doesn't need the CLOCK_TAI to be set. @@ -49,7 +51,7 @@ /* Loads, parses and represents TAI-UTC offset information from the IETF bulletin */ class ClockTAI : public RemoteControllable { public: - ClockTAI(); + ClockTAI(const std::vector<std::string>& bulletin_urls); // Fetch the bulletin from the IETF website and return the current // TAI-UTC offset. @@ -81,6 +83,8 @@ class ClockTAI : public RemoteControllable { int m_offset = 0; int m_offset_valid = false; + std::vector<std::string> m_bulletin_urls; + mutable std::stringstream m_bulletin; std::chrono::system_clock::time_point m_bulletin_download_time; |