#ifndef DCPOMATIC_TIME_H
#define DCPOMATIC_TIME_H
+#include "frame_rate_change.h"
+#include "safe_stringstream.h"
+#include "dcpomatic_assert.h"
+#include <stdint.h>
#include <cmath>
#include <ostream>
#include <sstream>
#include <iomanip>
-#include <stdint.h>
-#include "frame_rate_change.h"
-#include "safe_stringstream.h"
class dcpomatic_round_up_test;
return rint (_t * r / HZ);
}
+ /** @param r Frames per second */
template <typename T>
void split (T r, int& h, int& m, int& s, int& f) const
{
template <class T>
static ContentTime from_frames (int64_t f, T r) {
- assert (r > 0);
+ DCPOMATIC_ASSERT (r > 0);
return ContentTime (f * HZ / r);
}
template <class T>
static DCPTime from_frames (int64_t f, T r) {
- assert (r > 0);
+ DCPOMATIC_ASSERT (r > 0);
return DCPTime (f * HZ / r);
}