view include/core/session.h @ 222:b9f111d84d95

*: move to semver, remove old macos build, add library files I'm retarded and can't commit files right
author Paper <paper@paper.us.eu.org>
date Mon, 08 Jan 2024 13:22:09 -0500
parents 53211cb1e7f5
children 4d461ef7d424
line wrap: on
line source

#ifndef __core__session_h
#define __core__session_h

#include "core/config.h"
#include "gui/locale.h"
#include <QElapsedTimer>

#include "semver/semver.hpp"

struct Session {
	public:
		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(); }

		Config config;
		static constexpr semver::version version{0, 1, 0, semver::prerelease::alpha, 1};

	private:
		unsigned int requests = 0;
		QElapsedTimer timer;
};

extern Session session;

#endif // __core__session_h