summaryrefslogtreecommitdiff
path: root/src/dcp_time.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-07-10 10:47:09 +0100
committerCarl Hetherington <cth@carlh.net>2014-07-10 10:47:09 +0100
commit608e055d35cd20fcc6734ca600bef3e9d56daca0 (patch)
tree013394892440e2f1d2d9095facec2f2a689da6ff /src/dcp_time.cc
parentf853cbd6d1ca683a3403202357b02041626abd84 (diff)
Add a couple of accessors.
Diffstat (limited to 'src/dcp_time.cc')
-rw-r--r--src/dcp_time.cc5
1 files changed, 5 insertions, 0 deletions
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;
+}