Mercurial > minori
view include/core/session.h @ 96:bd68e4393e6f
statistics: forward declare Graph
graph: fix missing #include (does this fix the build errors??)
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Wed, 01 Nov 2023 15:16:49 -0400 |
parents | c69230dc2b5d |
children | 2004b41d4a59 |
line wrap: on
line source
#ifndef __core__session_h #define __core__session_h #include "core/config.h" #include <QElapsedTimer> struct Session { public: Config config; 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(); } private: int requests = 0; QElapsedTimer timer; }; extern Session session; #endif // __core__session_h