COIN-OR::LEMON - Graph Library

Changeset 124:8d24100ad408 in lemon-0.x for src/work


Ignore:
Timestamp:
02/23/04 18:33:50 (17 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@166
Message:

.

File:
1 edited

Legend:

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

    r121 r124  
    7777  double getUserTime() const
    7878  {
    79     long cls = sysconf(_SC_CLK_TCK);
    80     return double(ts.tms_utime)/cls;
     79    return double(ts.tms_utime)/sysconf(_SC_CLK_TCK);
    8180  }
    8281  double getSystemTime() const
    8382  {
    84     long cls = sysconf(_SC_CLK_TCK);
    85     return double(ts.tms_stime)/cls;
     83    return double(ts.tms_stime)/sysconf(_SC_CLK_TCK);
    8684  }
    8785  double getCUserTime() const
    8886  {
    89     long cls = sysconf(_SC_CLK_TCK);
    90     return double(ts.tms_cutime)/cls;
     87    return double(ts.tms_cutime)/sysconf(_SC_CLK_TCK);
    9188  }
    9289  double getCSystemTime() const
    9390  {
    94     long cls = sysconf(_SC_CLK_TCK);
    95     return double(ts.tms_cstime)/cls;
     91    return double(ts.tms_cstime)/sysconf(_SC_CLK_TCK);
    9692  }
    9793};
     
    10197  TimeStamp start_time;
    10298
     99  void _reset() {start_time.stamp();}
     100
    103101public:
    104   void reset() {start_time.stamp();}
    105   Timer() {reset();}
     102  Timer() {_reset();}
    106103
    107104  operator TimeStamp ()
     
    110107    t.stamp();
    111108    return t-start_time;
    112   } 
     109  }
     110 
     111  TimeStamp reset()
     112  {
     113    TimeStamp t(start_time);
     114    _reset();
     115    return start_time-t;
     116  }
     117
    113118};
    114119
Note: See TracChangeset for help on using the changeset viewer.