diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-09-22 01:06:45 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-09-22 01:06:45 +0200 |
commit | 9ba1cd15e7f902cae705ff22451e4f76ad0d71ab (patch) | |
tree | aafc4d87d81489d3e8ab782c8b7922c44f1ea192 /logic/BaseInstance.h | |
parent | b10761711234b69cf8509bacb055f7d5c3c021e8 (diff) | |
download | MultiMC-9ba1cd15e7f902cae705ff22451e4f76ad0d71ab.tar MultiMC-9ba1cd15e7f902cae705ff22451e4f76ad0d71ab.tar.gz MultiMC-9ba1cd15e7f902cae705ff22451e4f76ad0d71ab.tar.lz MultiMC-9ba1cd15e7f902cae705ff22451e4f76ad0d71ab.tar.xz MultiMC-9ba1cd15e7f902cae705ff22451e4f76ad0d71ab.zip |
GH-1217 add simple instance play time tracking
Not reliable in the face of crashes... but what is?
Diffstat (limited to 'logic/BaseInstance.h')
-rw-r--r-- | logic/BaseInstance.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/logic/BaseInstance.h b/logic/BaseInstance.h index 7fbd5de5..32a4d1cd 100644 --- a/logic/BaseInstance.h +++ b/logic/BaseInstance.h @@ -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>) |