diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-01-24 09:43:22 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-01-24 09:43:22 +0100 |
commit | a2a8ed04fcf61f73e776c7ee2cfc44fb1fc5dbe6 (patch) | |
tree | 71ce1d12c072461b362be03fc2aa26f3d6e74c91 /src/TimestampDecoder.h | |
parent | 904e6bd37fbd25a0fc038faa436039ff24aea67d (diff) | |
download | dabmod-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.h | 6 |
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", |