diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-04-06 14:37:55 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-04-06 14:37:55 +0200 |
commit | 8b4734e97d04967beb070f87be8b22f38eea33ad (patch) | |
tree | e3d60892ad4295bc4f63420e575231f3c0227061 /contrib/ClockTAI.h | |
parent | 17591c94cf2553b8361b35846e12f72d33d8da7f (diff) | |
download | ODR-AudioEnc-8b4734e97d04967beb070f87be8b22f38eea33ad.tar.gz ODR-AudioEnc-8b4734e97d04967beb070f87be8b22f38eea33ad.tar.bz2 ODR-AudioEnc-8b4734e97d04967beb070f87be8b22f38eea33ad.zip |
Common eb85d35: TAI bulletin refresh before it expires
Diffstat (limited to 'contrib/ClockTAI.h')
-rw-r--r-- | contrib/ClockTAI.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/ClockTAI.h b/contrib/ClockTAI.h index 50a6323..743cf68 100644 --- a/contrib/ClockTAI.h +++ b/contrib/ClockTAI.h @@ -79,14 +79,15 @@ class ClockTAI : public RemoteControllable { // Protect all data members, as RC functions are in another thread mutable std::mutex m_data_mutex; - // The currently used TAI-UTC offset + // The currently used TAI-UTC offset, extracted from m_bulletin and cached here + // to avoid having to parse the bulletin all the time int m_offset = 0; int m_offset_valid = false; std::vector<std::string> m_bulletin_urls; std::string m_bulletin; - std::chrono::system_clock::time_point m_bulletin_download_time; + std::chrono::system_clock::time_point m_bulletin_refresh_time; // Update the cache file with the current m_bulletin void update_cache(const char* cache_filename); |