Mercurial > minori
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/include/session.h Thu Aug 24 23:11:38 2023 -0400 @@ -0,0 +1,16 @@ +#ifndef __session_h +#define __session_h +#include <QElapsedTimer> +#include "config.h" + +struct Session { + Config config; + Session() { timer.start(); } + int uptime() { return timer.nsecsElapsed() / 1000; } + + private: QElapsedTimer timer; +}; + +extern Session session; + +#endif // __session_h \ No newline at end of file