view include/core/session.h @ 83:d02fdf1d6708

*: huuuge update 1. make the now playing page function correctly 2. de-constructorfy many of our custom widgets, allowing them to be changed on-the-fly from the Now Playing page 3. ... :)
author Paper <mrpapersonic@gmail.com>
date Tue, 24 Oct 2023 22:01:02 -0400
parents 75c804f713b2
children c69230dc2b5d
line wrap: on
line source

#ifndef __core__session_h
#define __core__session_h
#include "core/config.h"
#include <QElapsedTimer>

struct Session {
	public:
		Config config;
		Session() { timer.start(); }
		/* we literally *cannot* be lying to the user by doing this */
		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