annotate src/include/session.h @ 7:07a9095eaeed

Update Refactored some code, moved some around
author Paper <mrpapersonic@gmail.com>
date Thu, 24 Aug 2023 23:11:38 -0400
parents
children b1f73678ef61
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
1 #ifndef __session_h
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
2 #define __session_h
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
3 #include <QElapsedTimer>
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
4 #include "config.h"
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
5
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
6 struct Session {
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
7 Config config;
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
8 Session() { timer.start(); }
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
9 int uptime() { return timer.nsecsElapsed() / 1000; }
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
10
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
11 private: QElapsedTimer timer;
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
12 };
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
13
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
14 extern Session session;
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
15
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
16 #endif // __session_h