summaryrefslogtreecommitdiffstats
path: root/src/TimestampDecoder.h
diff options
context:
space:
mode:
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 34d862f..1ef493e 100644
--- a/src/TimestampDecoder.h
+++ b/src/TimestampDecoder.h
@@ -94,6 +94,12 @@ struct frame_timestamp
return t;
}
+ long long int get_ns() const {
+ long long int ns = timestamp_sec * 1000000000ull;
+ ns += llrint((double)timestamp_pps / 0.016384);
+ return ns;
+ }
+
void print(const char* t)
{
fprintf(stderr,