#ifndef _utl_RealTimeStopwatch_h_ #define _utl_RealTimeStopwatch_h_ #include #include namespace utl { /** \class RealTimeStopwatch RealTimeStopwatch.h "utl/RealTimeStopwatch.h" Note: constructor starts the stopwatch. Use Reset() before starting it at the later time. \author D. Veberic \date 16 May 2007 \version $Id$ */ class RealTimeStopwatch { public: RealTimeStopwatch(const bool start = true); void Reset(); void Start(); /// returns time since last call to Start() double Stop(); double GetTime(); private: bool fIsStopped; struct timeval fStart; double fTimeSum; }; } // namespace utl #endif // Configure (x)emacs for this file ... // Local Variables: // mode: c++ // End: