Mercurial > minori
view include/core/session.h @ 48:e613772f41d5
statistics.cpp: show requests made
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Mon, 25 Sep 2023 01:07:22 -0400 |
parents | d8eb763e6661 |
children | 75c804f713b2 |
line wrap: on
line source
#ifndef __core__session_h #define __core__session_h #include "core/config.h" #include <QElapsedTimer> struct Session { Config config; Session() { timer.start(); } 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