152 |
152 |
153 ///Prints the time counters |
153 ///Prints the time counters |
154 |
154 |
155 ///Prints the time counters in the folloing form: |
155 ///Prints the time counters in the folloing form: |
156 /// |
156 /// |
157 /// u: XX.XXs s: XX.XXs cu: XX.XXs cs: XX.XXs real: XX.XXs |
157 /// <tt>u: XX.XXs s: XX.XXs cu: XX.XXs cs: XX.XXs real: XX.XXs</tt> |
158 /// |
158 /// |
159 /// where the values are the |
159 /// where the values are the |
160 /// - a user cpu time, |
160 /// \li \c u: user cpu time, |
161 /// - a system cpu time, |
161 /// \li \c s: system cpu time, |
162 /// - a user cpu time of children, |
162 /// \li \c cu: user cpu time of children, |
163 /// - a system cpu time of children and |
163 /// \li \c cs: system cpu time of children, |
164 /// - a real time, |
164 /// \li \c real: real time. |
165 /// |
|
166 ///respectively |
|
167 inline std::ostream& operator<<(std::ostream& os,const TimeStamp &t) |
165 inline std::ostream& operator<<(std::ostream& os,const TimeStamp &t) |
168 { |
166 { |
169 long cls = sysconf(_SC_CLK_TCK); |
167 long cls = sysconf(_SC_CLK_TCK); |
170 os << "u: " << double(t.getTms().tms_utime)/cls << |
168 os << "u: " << double(t.getTms().tms_utime)/cls << |
171 "s, s: " << double(t.getTms().tms_stime)/cls << |
169 "s, s: " << double(t.getTms().tms_stime)/cls << |