COIN-OR::LEMON - Graph Library

Changeset 327:63c138adc477 in lemon-0.x for src/work/marci


Ignore:
Timestamp:
04/15/04 08:49:49 (21 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@445
Message:

Documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/marci/time_measure.h

    r324 r327  
    1818//   }
    1919
     20  /// Class to store (cpu)time instances.
     21
     22  /// This class stores five time values.
     23  /// - a real time
     24  /// - a user cpu time
     25  /// - a system cpu time
     26  /// - a user cpu time of children
     27  /// - a system cpu time of children
     28  ///
     29  /// TimeStamp's can be added to or substracted from each other and
     30  /// they can be push to a stream.
     31
    2032  class TimeStamp
    2133  {
     
    2840    const tms &getTms() const {return ts;}
    2941    double getRealTime() const {return real_time;}
     42    ///Read the current time values of the process.
    3043    void stamp()
    3144    {
     
    3548    }
    3649 
     50    /// Constructor initializing with zero.
    3751    TimeStamp()
    3852    { ts.tms_utime=ts.tms_stime=ts.tms_cutime=ts.tms_cstime=0; real_time=0;}
    39  
     53    ///Constructor initializing with the current time values of the process.
    4054    TimeStamp(void *) { stamp();}
    4155 
     
    6983    }
    7084
     85    ///The time ellapsed since the last call of stamp()
    7186    TimeStamp ellapsed() const
    7287    {
     
    95110  };
    96111
     112  ///Class measuring the cpu time and real time usage of the process.
    97113  class Timer
    98114  {
     
    102118 
    103119  public:
     120    ///Constructor. It starts with zero time counters.
    104121    Timer() {_reset();}
    105122
     123    ///Computes the ellapsed time.
     124
     125    ///This conversion computes the ellapsed time
     126    ///since the construction of \c t or since
     127    ///the last \c t.reset().
    106128    operator TimeStamp ()
    107129    {
     
    111133    }
    112134
     135    ///Resets the time counters.
    113136    TimeStamp reset()
    114137    {
     
    119142  };
    120143
     144  ///Prints the time counters.
    121145  inline std::ostream& operator<<(std::ostream& os,const TimeStamp &t)
    122146  {
Note: See TracChangeset for help on using the changeset viewer.