summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-11-02 00:32:33 +0000
committerCarl Hetherington <cth@carlh.net>2014-11-02 00:32:33 +0000
commit3c5c59b5244d8948f05a3251ec14cb20fbcc0d7c (patch)
tree42ed0027aa240f492c4428afc8109428f36c962a /src
parentc9338a9960d363c86020dcb17fef7de40b72c061 (diff)
Forward-port time rounding fix from 0.x.
Diffstat (limited to 'src')
-rw-r--r--src/dcp_time.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dcp_time.cc b/src/dcp_time.cc
index e2803a53..9ce36764 100644
--- a/src/dcp_time.cc
+++ b/src/dcp_time.cc
@@ -56,8 +56,8 @@ Time::Time (int64_t ticks)
void
Time::set (double ss)
{
- t = (int (round (ss * 1000)) % 1000) / 4;
s = floor (ss);
+ t = int (round (1000 * (ss - s) / 4));
if (s >= 60) {
m = s / 60;