From 608e055d35cd20fcc6734ca600bef3e9d56daca0 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 10 Jul 2014 10:47:09 +0100 Subject: Add a couple of accessors. --- src/dcp_time.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/dcp_time.cc') diff --git a/src/dcp_time.cc b/src/dcp_time.cc index a3822ed0..35cd747a 100644 --- a/src/dcp_time.cc +++ b/src/dcp_time.cc @@ -249,3 +249,8 @@ Time::to_ticks () const return int64_t(t) + int64_t(s) * 250 + int64_t(m) * 60 * 250 + int64_t(h) * 60 * 60 * 250; } +double +Time::to_seconds () const +{ + return double (to_ticks ()) / 250; +} -- cgit v1.2.3