GH-1217 add simple instance play time tracking
Not reliable in the face of crashes... but what is?
This commit is contained in:
parent
b107617112
commit
9ba1cd15e7
13 changed files with 103 additions and 51 deletions
|
@ -71,6 +71,7 @@ public:
|
|||
|
||||
void setRunning(bool running);
|
||||
bool isRunning() const;
|
||||
int64_t totalTimePlayed();
|
||||
|
||||
/// get the type of this instance
|
||||
QString instanceType() const;
|
||||
|
@ -190,6 +191,8 @@ public:
|
|||
/// get variables this instance exports
|
||||
virtual QMap<QString, QString> getVariables() const = 0;
|
||||
|
||||
virtual QString typeName() const = 0;
|
||||
|
||||
enum InstanceFlag
|
||||
{
|
||||
VersionBrokenFlag = 0x01,
|
||||
|
@ -230,6 +233,7 @@ protected:
|
|||
SettingsObjectPtr m_settings;
|
||||
InstanceFlags m_flags;
|
||||
bool m_isRunning = false;
|
||||
QDateTime m_timeStarted;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(std::shared_ptr<BaseInstance>)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue