comparison base/RealTime.h @ 121:7c3e1bc51080

* RFE 1497743: Adjust layer text file format to allow copy/paste into Excel Use \t as the default separator for text file export, and remove the leading space from RealTime::toString values
author Chris Cannam
date Thu, 08 Jun 2006 11:12:47 +0000
parents 7afcfe666910
children 3c1d5ef43baa
comparison
equal deleted inserted replaced
120:e388730429b5 121:7c3e1bc51080
19 */ 19 */
20 20
21 #ifndef _REAL_TIME_H_ 21 #ifndef _REAL_TIME_H_
22 #define _REAL_TIME_H_ 22 #define _REAL_TIME_H_
23 23
24 #include "vamp-sdk/RealTime.h" 24 //#include "vamp-sdk/RealTime.h"
25 using Vamp::RealTime; 25 //using Vamp::RealTime;
26 26
27 #ifdef NOT_DEFINED 27 //#ifdef NOT_DEFINED
28 28
29 #include <iostream> 29 #include <iostream>
30 #include <string> 30 #include <string>
31 31
32 struct timeval; 32 struct timeval;
102 // Find the fractional difference between times 102 // Find the fractional difference between times
103 // 103 //
104 double operator/(const RealTime &r) const; 104 double operator/(const RealTime &r) const;
105 105
106 // Return a human-readable debug-type string to full precision 106 // Return a human-readable debug-type string to full precision
107 // (probably not a format to show to a user directly) 107 // (probably not a format to show to a user directly). If align
108 // is true, prepend " " to the start of positive values so that
109 // they line up with negative ones (which start with "-").
108 // 110 //
109 std::string toString() const; 111 std::string toString(bool align = false) const;
110 112
111 // Return a user-readable string to the nearest millisecond 113 // Return a user-readable string to the nearest millisecond
112 // in a form like HH:MM:SS.mmm 114 // in a form like HH:MM:SS.mmm
113 // 115 //
114 std::string toText(bool fixedDp = false) const; 116 std::string toText(bool fixedDp = false) const;
121 static const RealTime zeroTime; 123 static const RealTime zeroTime;
122 }; 124 };
123 125
124 std::ostream &operator<<(std::ostream &out, const RealTime &rt); 126 std::ostream &operator<<(std::ostream &out, const RealTime &rt);
125 127
126 #endif 128 //#endif
127 129
128 #endif 130 #endif