src/hugo/time_measure.h
changeset 835 eb9587f09b42
parent 696 48aa9ace1d7d
child 906 17f31d280385
equal deleted inserted replaced
1:39f5b93e6362 2:0909c424a8cd
   127   ///Class measuring the cpu time and real time usage of the process.
   127   ///Class measuring the cpu time and real time usage of the process.
   128   ///It is quite easy-to-use, here is a short example.
   128   ///It is quite easy-to-use, here is a short example.
   129   ///\code
   129   ///\code
   130   ///#include<hugo/time_measure.h>
   130   ///#include<hugo/time_measure.h>
   131   ///#include<iostream>
   131   ///#include<iostream>
   132 
   132   ///
   133   ///int main()
   133   ///int main()
   134   ///{
   134   ///{
   135   ///
   135   ///
   136   ///  ...
   136   ///  ...
   137   ///
   137   ///
   191   /// \li \c u: user cpu time,
   191   /// \li \c u: user cpu time,
   192   /// \li \c s: system cpu time,
   192   /// \li \c s: system cpu time,
   193   /// \li \c cu: user cpu time of children,
   193   /// \li \c cu: user cpu time of children,
   194   /// \li \c cs: system cpu time of children,
   194   /// \li \c cs: system cpu time of children,
   195   /// \li \c real: real time.
   195   /// \li \c real: real time.
       
   196   /// \relates TimeStamp
   196   inline std::ostream& operator<<(std::ostream& os,const TimeStamp &t)
   197   inline std::ostream& operator<<(std::ostream& os,const TimeStamp &t)
   197   {
   198   {
   198     long cls = sysconf(_SC_CLK_TCK);
   199     long cls = sysconf(_SC_CLK_TCK);
   199     os << "u: " << double(t.getTms().tms_utime)/cls <<
   200     os << "u: " << double(t.getTms().tms_utime)/cls <<
   200       "s, s: " << double(t.getTms().tms_stime)/cls <<
   201       "s, s: " << double(t.getTms().tms_stime)/cls <<