*/
+/** @file src/dcp_time.cc
+ * @brief A representation of time within a DCP.
+ */
+
#include <iostream>
#include <cmath>
#include "dcp_time.h"
using namespace libdcp;
Time::Time (int frame, int frames_per_second)
+ : h (0)
+ , m (0)
+ , s (0)
+ , t (0)
{
float sec_float = float (frame) / frames_per_second;
- t = (int (sec_float * 1000) % 1000) / 4;
+ t = (int (floor (sec_float * 1000)) % 1000) / 4;
s = floor (sec_float);
if (s > 60) {