comparison base/RealTime.h @ 1541:71207822a7e0 zoom

Provide fromMicroseconds (and test it)
author Chris Cannam
date Thu, 27 Sep 2018 15:53:34 +0100
parents 48e9f538e6e9
children 6415ac3becb6
comparison
equal deleted inserted replaced
1540:a53bf95f0bea 1541:71207822a7e0
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(int msec);
61 static RealTime fromMicroseconds(int 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); }