OSDN Git Service

Use QElapsedTimer class instead of MUtils::OS::perfcounter_read() where appropriate.
[lamexp/LameXP.git] / src / Tool_Abstract.h
index 876c524..d54b413 100644 (file)
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 // LameXP - Audio Encoder Front-End
-// Copyright (C) 2004-2013 LoRd_MuldeR <MuldeR2@GMX.de>
+// Copyright (C) 2004-2014 LoRd_MuldeR <MuldeR2@GMX.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -26,6 +26,7 @@
 
 class QMutex;
 class QProcess;
+class QElapsedTimer;
 class JobObject;
 
 class AbstractTool : public QObject
@@ -47,10 +48,13 @@ protected:
        static const int m_processTimeoutInterval = 600000;
 
 private:
-       static quint64 s_lastLaunchTime;
-       static QMutex s_mutex_startProcess;
-       static unsigned int s_jobObjRefCount;
-       static JobObject *s_jobObject;
+       static QScopedPointer<JobObject>     s_jobObjectInstance;
+       static QScopedPointer<QElapsedTimer> s_startProcessTimer;
+
+       static QMutex s_startProcessMutex;
+       static QMutex s_createObjectMutex;
+
+       static quint64 s_referenceCounter;
 
        bool m_firstLaunch;
 };