Show ruler timestamps in cursors and popups
[pulseview.git] / pv / views / trace / view.cpp
index 7f77635d235791192bb05ed5db79f680dfc5ae6d..8e2a2b329daa7bfae8ffbe96f507b550de88fa92 100644 (file)
@@ -456,6 +456,16 @@ void View::set_scale(double scale)
        }
 }
 
+pv::util::Timestamp View::absolute_to_ruler_time(const pv::util::Timestamp& abs_time) const
+{
+    return abs_time + zero_offset_;
+}
+
+pv::util::Timestamp View::ruler_to_absolute_time(const pv::util::Timestamp& ruler_time) const
+{
+    return ruler_time - zero_offset_;
+}
+
 void View::set_offset(const pv::util::Timestamp& offset, bool force_update)
 {
        if ((offset_ != offset) || force_update) {