115 std::string
toString(
bool align =
false)
const;
127 std::string
toText(
bool fixedDp =
false)
const;
RealTime operator+(const RealTime &r) const
static RealTime fromTimeval(const struct timeval &)
static RealTime fromString(std::string)
Convert a string as obtained from toString back to a RealTime object.
static RealTime frame2RealTime(long frame, unsigned int sampleRate)
Convert a sample frame at the given sample rate into a RealTime.
std::string toText(bool fixedDp=false) const
Return a user-readable string to the nearest millisecond, in a form like HH:MM:SS....
std::string toXsdDuration() const
Return a string in xsd:duration format.
static RealTime fromSeconds(double sec)
bool operator<(const RealTime &r) const
RealTime operator-(const RealTime &r) const
RealTime operator/(int d) const
bool operator<=(const RealTime &r) const
bool operator!=(const RealTime &r) const
bool operator >(const RealTime &r) const
std::string toSecText() const
Return a user-readable string to the nearest second, in a form like "6s" (for less than a minute) or ...
RealTime(const RealTime &r)
static RealTime fromMilliseconds(int msec)
std::ostream & operator<<(std::ostream &out, const RealTime &rt)
static long realTime2Frame(const RealTime &r, unsigned int sampleRate)
Convert a RealTime into a sample frame at the given sample rate.
RealTime & operator=(const RealTime &r)
static const RealTime zeroTime
bool operator==(const RealTime &r) const
std::string toString(bool align=false) const
Return a human-readable debug-type string to full precision (probably not a format to show to a user ...
static RealTime fromXsdDuration(std::string xsdd)
RealTime operator-() const
bool operator>=(const RealTime &r) const
std::string toFrameText(int fps) const
Return a user-readable string in which seconds are divided into frames (presumably at a lower frame r...
RealTime operator *(int m) const
RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conve...