annotate src/include/session.h @ 8:b1f73678ef61

update text paragraphs are now their own objects, as they should be
author Paper <mrpapersonic@gmail.com>
date Sat, 26 Aug 2023 03:39:34 -0400
parents 07a9095eaeed
children
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(); }
8
Paper <mrpapersonic@gmail.com>
parents: 7
diff changeset
9 int uptime() { return timer.elapsed(); }
7
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