summaryrefslogtreecommitdiffstats
path: root/lib/ClockTAI.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2020-04-06 14:38:31 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2020-04-06 14:38:31 +0200
commit88e46d22e59df65de3202074352ecbacf56e4b16 (patch)
tree44fffae53c0e7a009ebcc5c6d62f60dc42872ec4 /lib/ClockTAI.h
parent553c9901d30ff793363091480928434f6e563e6e (diff)
downloaddabmux-88e46d22e59df65de3202074352ecbacf56e4b16.tar.gz
dabmux-88e46d22e59df65de3202074352ecbacf56e4b16.tar.bz2
dabmux-88e46d22e59df65de3202074352ecbacf56e4b16.zip
Common eb85d35: TAI bulletin refresh before it expires
Diffstat (limited to 'lib/ClockTAI.h')
-rw-r--r--lib/ClockTAI.h5
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);