aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--decoder/ETIWriter.cpp1
-rw-r--r--test/main.cpp9
2 files changed, 9 insertions, 1 deletions
diff --git a/decoder/ETIWriter.cpp b/decoder/ETIWriter.cpp
index 5f6737d..784c73b 100644
--- a/decoder/ETIWriter.cpp
+++ b/decoder/ETIWriter.cpp
@@ -284,6 +284,7 @@ void ETIWriter::assemble()
etiFrame.frame = move(eti);
etiFrame.timestamp.seconds = m_seconds;
etiFrame.timestamp.utco = m_utco;
+ etiFrame.timestamp.tsta = m_fc.tsta;
etiFrame.mnsc = m_mnsc;
etiFrame.frame_characterisation = move(m_fc);
diff --git a/test/main.cpp b/test/main.cpp
index 7042e8c..8959633 100644
--- a/test/main.cpp
+++ b/test/main.cpp
@@ -143,7 +143,14 @@ int main(int argc, char **argv)
TimestampDecoder ts_dec(offset);
auto eti_cb = [&](EdiDecoder::eti_frame_t&& eti) {
- fprintf(stderr, "ETI %s\n", eti.timestamp.to_string().c_str());
+
+ const auto ts = eti.timestamp.to_system_clock();
+ const auto now = chrono::system_clock::now();
+
+ fprintf(stderr, "ETI %-55s Delta %ld ms\n",
+ eti.timestamp.to_string().c_str(),
+ chrono::duration_cast<chrono::milliseconds>(now - ts).count());
+
if (fd_out) {
fwrite(eti.frame.data(), eti.frame.size(), 1, fd_out);
}