diff options
| author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-04-06 14:33:37 +0200 |
|---|---|---|
| committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-04-06 14:33:37 +0200 |
| commit | 1ffe19263746b429599935776af94f3cc43f9bd5 (patch) | |
| tree | 831b9175995f00695d1b2fc36ca767bb6c23adfd /lib/ClockTAI.h | |
| parent | 968cfd27e659b42a0ca2b3c15265c8999086b45a (diff) | |
| download | ODR-SourceCompanion-1ffe19263746b429599935776af94f3cc43f9bd5.tar.gz ODR-SourceCompanion-1ffe19263746b429599935776af94f3cc43f9bd5.tar.bz2 ODR-SourceCompanion-1ffe19263746b429599935776af94f3cc43f9bd5.zip | |
Common eb85d35: TAI bulletin refresh before it expires
Diffstat (limited to 'lib/ClockTAI.h')
| -rw-r--r-- | lib/ClockTAI.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ClockTAI.h b/lib/ClockTAI.h index 50a6323..743cf68 100644 --- a/lib/ClockTAI.h +++ b/lib/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); |
