summaryrefslogtreecommitdiffstats
path: root/lib/edi/common.hpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-09-05 17:09:18 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-09-05 17:09:18 +0200
commit1ed62f38f32b219f1eb7e9e06024f9fa86eb58bc (patch)
tree3e9efdc4d4b04171136a00cf772edf93f0bac04e /lib/edi/common.hpp
parenteb9652e7406a693617932e5c4ed2bcd40d069c06 (diff)
downloaddabmux-1ed62f38f32b219f1eb7e9e06024f9fa86eb58bc.tar.gz
dabmux-1ed62f38f32b219f1eb7e9e06024f9fa86eb58bc.tar.bz2
dabmux-1ed62f38f32b219f1eb7e9e06024f9fa86eb58bc.zip
lib: update from common code cdf104a and 2847f4d
Diffstat (limited to 'lib/edi/common.hpp')
-rw-r--r--lib/edi/common.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/edi/common.hpp b/lib/edi/common.hpp
index 887bc3d..1aa2cb6 100644
--- a/lib/edi/common.hpp
+++ b/lib/edi/common.hpp
@@ -38,10 +38,15 @@ struct frame_timestamp_t {
bool valid() const;
std::string to_string() const;
- time_t to_unix_epoch() const;
+ std::time_t to_unix_epoch() const;
std::chrono::system_clock::time_point to_system_clock() const;
+
+ double diff_ms(const frame_timestamp_t& other) const;
+
+ static frame_timestamp_t from_unix_epoch(std::time_t time, uint32_t tai_utc_offset, uint32_t tsta);
};
+
struct decode_state_t {
decode_state_t(bool _complete, size_t _num_bytes_consumed) :
complete(_complete), num_bytes_consumed(_num_bytes_consumed) {}