, s (0)
, t (0)
{
- float sec_float = float (frame) / frames_per_second;
- t = (int (floor (sec_float * 1000)) % 1000) / 4;
- s = floor (sec_float);
+ set (double (frame) / frames_per_second);
+}
+
+void
+Time::set (double ss)
+{
+ t = (int (round (ss * 1000)) % 1000) / 4;
+ s = floor (ss);
if (s > 60) {
m = s / 60;
vector<string> b;
split (b, time, is_any_of (":"));
if (b.size() != 4) {
- throw DCPReadError ("unrecognised time specification");
+ boost::throw_exception (DCPReadError ("unrecognised time specification"));
}
h = lexical_cast<int> (b[0]);