#ifndef _utl_Stopwatch_h_ #define _utl_Stopwatch_h_ #include #include namespace utl { /** \class Stopwatch Stopwatch.h "utl/Stopwatch.h" \author D. Veberic \date 13 May 2005 \version $Id$ */ class Stopwatch { public: enum CPUTime { eTotal, eUser, eSystem }; Stopwatch(); void Reset(); void Start(); void Stop(); double GetCPUTime(const CPUTime kind = eTotal); private: static const long fgClockTicks; bool fIsStopped; struct tms fStart; clock_t fUserTimeSum; clock_t fSystemTimeSum; }; } // namespace utl #endif // Configure (x)emacs for this file ... // Local Variables: // mode: c++ // End: