comparison base/RealTime.h @ 1551:4de4284d0596

Merge from branch zoom
author Chris Cannam
date Wed, 10 Oct 2018 08:44:15 +0100
parents 6415ac3becb6
children
comparison
equal deleted inserted replaced
1548:51d6551d5244 1551:4de4284d0596
55 55
56 RealTime(const Vamp::RealTime &r) : 56 RealTime(const Vamp::RealTime &r) :
57 sec(r.sec), nsec(r.nsec) { } 57 sec(r.sec), nsec(r.nsec) { }
58 58
59 static RealTime fromSeconds(double sec); 59 static RealTime fromSeconds(double sec);
60 static RealTime fromMilliseconds(int msec); 60 static RealTime fromMilliseconds(int64_t msec);
61 static RealTime fromMicroseconds(int64_t usec);
61 static RealTime fromTimeval(const struct timeval &); 62 static RealTime fromTimeval(const struct timeval &);
62 static RealTime fromXsdDuration(std::string xsdd); 63 static RealTime fromXsdDuration(std::string xsdd);
63 64
64 double toDouble() const; 65 double toDouble() const;
65 Vamp::RealTime toVampRealTime() const { return Vamp::RealTime(sec, nsec); } 66 Vamp::RealTime toVampRealTime() const { return Vamp::RealTime(sec, nsec); }
169 * (29.97 not supported). 170 * (29.97 not supported).
170 * 171 *
171 * Unlike toText, this function does not depend on the application 172 * Unlike toText, this function does not depend on the application
172 * preferences. 173 * preferences.
173 */ 174 */
174 std::string toFrameText(int fps, bool hms) const; 175 std::string toFrameText(int fps, bool hms,
176 std::string frameDelimiter = ":") const;
175 177
176 /** 178 /**
177 * Return a user-readable string to the nearest second, in H:M:S 179 * Return a user-readable string to the nearest second, in H:M:S
178 * form. Does not include milliseconds or frames. The result will 180 * form. Does not include milliseconds or frames. The result will
179 * be suffixed "s" if it contains only seconds (no hours or 181 * be suffixed "s" if it contains only seconds (no hours or