20 #ifndef LIBSUB_SUB_TIME_H
21 #define LIBSUB_SUB_TIME_H
24 #include <boost/optional.hpp>
41 int milliseconds ()
const;
43 double all_as_seconds ()
const;
48 static Time from_hmsf (
int h,
int m,
int s,
int f, boost::optional<Rational> rate = boost::optional<Rational> ());
49 static Time from_hms (
int h,
int m,
int s,
int ms);
53 friend bool operator< (
Time const & a,
Time const & b);
54 friend bool operator> (
Time const & a,
Time const & b);
55 friend bool operator== (
Time const & a,
Time const & b);
56 friend std::ostream& operator<< (std::ostream& s,
Time const & t);
58 Time (
int seconds,
int frames, boost::optional<Rational> rate)
66 boost::optional<Rational> _rate;
69 bool operator< (
Time const & a,
Time const & b);
70 bool operator> (
Time const & a,
Time const & b);
71 bool operator== (
Time const & a,
Time const & b);
72 bool operator!= (
Time const & a,
Time const & b);
73 std::ostream& operator<< (std::ostream& s,
Time const & t);
Definition: rational.h:23
Definition: sub_time.h:29
void add(Time t)
Definition: sub_time.cc:177
static Time from_frames(int frames, Rational rate)
Definition: sub_time.cc:162