| 48 | \*---------------------------------------------------------------------------*/ |
| 49 | |
| 50 | class clockTime |
| 51 | { |
| 52 | // Private data |
| 53 | |
| 54 | //- Time structure used |
| 55 | typedef struct timeval timeType; |
| 56 | |
| 57 | timeType startTime_; |
| 58 | |
| 59 | mutable timeType lastTime_; |
| 60 | mutable timeType newTime_; |
| 61 | |
| 62 | // Private Member Functions |
| 63 | |
| 64 | //- Retrieve the current time values from the system |
| 65 | static void getTime(timeType&); |
| 66 | |
| 67 | //- Difference between two times |
| 68 | static double timeDifference(const timeType& beg, const timeType& end); |
| 69 | |
| 70 | |
| 71 | public: |
| 72 | |
| 73 | // Constructors |
| 74 | |
| 75 | //- Construct with the current clock time |
| 76 | clockTime(); |
| 77 | |
| 78 | |
| 79 | // Member Functions |
| 80 | |
| 81 | //- Return time (in seconds) from the start |
| 82 | double elapsedTime() const; |
| 83 | |
| 84 | //- Return time (in seconds) since last call to timeIncrement() |
| 85 | double timeIncrement() const; |
| 86 | }; |
| 87 | |
| 88 | |
| 89 | // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // |
no outgoing calls
no test coverage detected