diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2025-04-23 11:18:08 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2025-04-23 11:18:08 +0200 |
commit | 103841bc578888a828d176eddfdd9fa345549f03 (patch) | |
tree | 6e4f14251adf2b1d6249f2b030aacec7e759b1fd /src/utils.cpp | |
parent | 397905cb5079205e2a4bb64cca35517e60c01a58 (diff) | |
download | dabmux-103841bc578888a828d176eddfdd9fa345549f03.tar.gz dabmux-103841bc578888a828d176eddfdd9fa345549f03.tar.bz2 dabmux-103841bc578888a828d176eddfdd9fa345549f03.zip |
Rework FIG0/10 DAB time indication to match EDI time
Diffstat (limited to 'src/utils.cpp')
-rw-r--r-- | src/utils.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/utils.cpp b/src/utils.cpp index 1a13caf..7ea6293 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -3,7 +3,7 @@ 2011, 2012 Her Majesty the Queen in Right of Canada (Communications Research Center Canada) - Copyright (C) 2021 + Copyright (C) 2025 Matthias P. Braendli, matthias.braendli@mpb.li http://www.opendigitalradio.org @@ -34,30 +34,8 @@ using namespace std; -static time_t dab_time_seconds = 0; -static int dab_time_millis = 0; - static void printServices(const vector<shared_ptr<DabService> >& services); -void update_dab_time() -{ - if (dab_time_seconds == 0) { - dab_time_seconds = time(nullptr); - } else { - dab_time_millis+= 24; - if (dab_time_millis >= 1000) { - dab_time_millis -= 1000; - ++dab_time_seconds; - } - } -} - -void get_dab_time(time_t *time, uint32_t *millis) -{ - *time = dab_time_seconds; - *millis = dab_time_millis; -} - uint32_t gregorian2mjd(int year, int month, int day) { |