libsub
Public Member Functions | Static Public Member Functions | Friends | List of all members
sub::Time Class Reference

Public Member Functions

int hours () const
 
int minutes () const
 
int seconds () const
 
int frames_at (Rational rate) const
 
int milliseconds () const
 
double all_as_seconds () const
 
void add (Time t)
 
void scale (float f)
 

Static Public Member Functions

static Time from_hmsf (int h, int m, int s, int f, boost::optional< Rational > rate=boost::optional< Rational >())
 
static Time from_hms (int h, int m, int s, int ms)
 
static Time from_frames (int frames, Rational rate)
 

Friends

bool operator< (Time const &a, Time const &b)
 
bool operator> (Time const &a, Time const &b)
 
bool operator== (Time const &a, Time const &b)
 
std::ostream & operator<< (std::ostream &s, Time const &t)
 

Member Function Documentation

◆ add()

void Time::add ( Time  t)

Add a time to this one. Both *this and t must have a specified _rate

◆ from_frames()

Time Time::from_frames ( int  f,
Rational  rate 
)
static

Create a Time from a number of frames. rate must be integer.


The documentation for this class was generated from the following files: