Mercurial > minori
view include/core/session.h @ 242:82470f83f0c2
autotools: make windows build work
also, I've added back the method I made for getting the vars as
variables rather than separate files, so less clutter in tmp folders :)
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Mon, 22 Jan 2024 19:06:23 -0800 |
parents | 4d461ef7d424 |
children | c130f47f6f48 |
line wrap: on
line source
#ifndef __core__session_h #define __core__session_h #include "core/config.h" #include "gui/locale.h" #include <QElapsedTimer> #include "semver/semver.hpp" struct Session { public: Session() { timer.start(); } /* we literally *cannot* be lying to the user by doing this */ void IncrementRequests() { requests++; }; int GetRequests() { return requests; }; int uptime() { return timer.elapsed(); } Config config; static constexpr semver::version version{PACKAGE_VERSION}; private: unsigned int requests = 0; QElapsedTimer timer; }; extern Session session; #endif // __core__session_h