diff base/Selection.h @ 1645:82596b4deef6 single-point

Add getDuratioN
author Chris Cannam
date Thu, 14 Mar 2019 13:11:30 +0000
parents c01cbe41aeb5
children 796ae7eecced
line wrap: on
line diff
--- a/base/Selection.h	Wed Mar 13 16:00:13 2019 +0000
+++ b/base/Selection.h	Thu Mar 14 13:11:30 2019 +0000
@@ -49,6 +49,7 @@
     bool isEmpty() const;
     sv_frame_t getStartFrame() const;
     sv_frame_t getEndFrame() const;
+    sv_frame_t getDuration() const { return getEndFrame() - getStartFrame(); }
     bool contains(sv_frame_t frame) const;
 
     bool operator<(const Selection &) const;