Mercurial > minori
comparison include/core/session.h @ 47:d8eb763e6661
information.cpp: add widgets to the list tab, and add an
"optional date" widget like taiga has so users can specify whether to
set the date or not
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Mon, 25 Sep 2023 00:43:38 -0400 |
parents | 4b198a111713 |
children | e613772f41d5 |
comparison
equal
deleted
inserted
replaced
46:d0adc4aedfc8 | 47:d8eb763e6661 |
---|---|
4 #include <QElapsedTimer> | 4 #include <QElapsedTimer> |
5 | 5 |
6 struct Session { | 6 struct Session { |
7 Config config; | 7 Config config; |
8 Session() { timer.start(); } | 8 Session() { timer.start(); } |
9 void AppendRequest() { requests++; }; | |
10 int GetRequests() { return requests; }; | |
9 int uptime() { return timer.elapsed(); } | 11 int uptime() { return timer.elapsed(); } |
10 | 12 |
11 private: | 13 private: |
14 int requests = 0; | |
12 QElapsedTimer timer; | 15 QElapsedTimer timer; |
13 }; | 16 }; |
14 | 17 |
15 extern Session session; | 18 extern Session session; |
16 | 19 |