VHISTlib  1.84.0.3018
/daten/ahuesgen/projects/vhist/code/vhistlib/include/shared/stopwatch.h
00001 /* $HEADERS
00002  $Id: stopwatch.h 2791 2013-05-06 11:24:28Z michael $
00003  */
00004 
00005 #ifndef STOPWATCH_INCLUDED
00006 #define STOPWATCH_INCLUDED
00007 
00008 #include "misc_defines.h"
00009 #include "logsource.h"
00010 
00011 #include <QString>
00012 
00013 namespace vhist
00014 {
00015 
00029 class VHIST_EXTERN StopWatch : public vhist::LogSource
00030 {
00031     Q_OBJECT
00032     
00033     public:
00034     StopWatch(QObject *pLogTarget = NULL);
00035     virtual ~StopWatch();
00036     
00037     public:
00038         void start(const QString& title, bool abortPrevious = false);
00039         void stop(bool generateMessage = true);
00040     
00041     private:
00042         QString m_title;
00043         bool m_running;
00044         unsigned long m_startTime;
00045 };
00046 
00047 } // namespace
00048 
00049 #endif // STOPWATCH_INCLUDED
00050 

VHISTlib 1.84.0.3018 of Jun 28 2013, generated by doxygen.