summaryrefslogtreecommitdiff
path: root/src/lib/dcpomatic_time.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/dcpomatic_time.h')
-rw-r--r--src/lib/dcpomatic_time.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/dcpomatic_time.h b/src/lib/dcpomatic_time.h
index 204af3c1e..3d792467b 100644
--- a/src/lib/dcpomatic_time.h
+++ b/src/lib/dcpomatic_time.h
@@ -125,6 +125,10 @@ public:
return Time<S, O> (llrint (HZ * frames_floor(r) / r));
}
+ Time<S, O> round (double r) const {
+ return Time<S, O> (llrint (HZ * frames_round(r) / r));
+ }
+
double seconds () const {
return double (_t) / HZ;
}