aboutsummaryrefslogtreecommitdiffstats
path: root/src/TimestampDecoder.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-01-24 09:43:22 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-01-24 09:43:22 +0100
commita2a8ed04fcf61f73e776c7ee2cfc44fb1fc5dbe6 (patch)
tree71ce1d12c072461b362be03fc2aa26f3d6e74c91 /src/TimestampDecoder.h
parent904e6bd37fbd25a0fc038faa436039ff24aea67d (diff)
downloaddabmod-a2a8ed04fcf61f73e776c7ee2cfc44fb1fc5dbe6.tar.gz
dabmod-a2a8ed04fcf61f73e776c7ee2cfc44fb1fc5dbe6.tar.bz2
dabmod-a2a8ed04fcf61f73e776c7ee2cfc44fb1fc5dbe6.zip
Handle Soapy TX and RX timestamps for DPD
Diffstat (limited to 'src/TimestampDecoder.h')
-rw-r--r--src/TimestampDecoder.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/TimestampDecoder.h b/src/TimestampDecoder.h
index 33d9992..6eedf9e 100644
--- a/src/TimestampDecoder.h
+++ b/src/TimestampDecoder.h
@@ -81,6 +81,12 @@ struct frame_timestamp
return ns;
}
+ void set_ns(long long int time_ns) {
+ timestamp_sec = time_ns / 1000000000ull;
+ const long long int subsecond = time_ns % 1000000000ull;
+ timestamp_pps = lrint(subsecond * 16384000.0);
+ }
+
void print(const char* t) const {
fprintf(stderr,
"%s <frame_timestamp(%s, %d, %.9f, %d)>\n",