set (double (frame) / frames_per_second, tcr_);
}
-/** Construct a Time with a timecode rate of 24 and using the supplied
- * number of seconds.
+/** Construct a Time from a number of seconds and a timecode rate.
*
* @param seconds A number of seconds.
+ * @param tcr_ Timecode rate.
*/
-Time::Time (double seconds)
+Time::Time (double seconds, int tcr_)
{
- set (seconds, 24);
+ set (seconds, tcr_);
}
/** Construct a Time with specified timecode rate and using the supplied
r = a + b;
BOOST_CHECK_EQUAL (r, dcp::Time (0, 0, 0, 240, 1152));
+ /* Check rounding on conversion from seconds */
+ BOOST_CHECK_EQUAL (dcp::Time (80.990, 1000), dcp::Time (0, 1, 20, 990, 1000));
+
/* Check rebase() */
a = dcp::Time (1, 58, 56, 2, 25);
BOOST_CHECK_EQUAL (a.rebase (250), dcp::Time (1, 58, 56, 20, 250));