]> sigrok.org Git - pulseview.git/blobdiff - pv/data/decode/annotation.cpp
TabularDecView: Visually indent annotations by PD stack level
[pulseview.git] / pv / data / decode / annotation.cpp
index fe0350d03b1643a4aedba1623a27ba23981c83b0..27a44fe4808208b09240d575910ff4f72b68cc42 100644 (file)
@@ -86,6 +86,11 @@ uint64_t Annotation::end_sample() const
        return end_sample_;
 }
 
+uint64_t Annotation::length() const
+{
+       return end_sample_ - start_sample_;
+}
+
 Annotation::Class Annotation::ann_class_id() const
 {
        return ann_class_id_;