view include/core/session.h @ 114:ab191e28e69d

*: add initial torrent stuff WOAH! these checkboxes are a pain in my fucking ass
author Paper <mrpapersonic@gmail.com>
date Tue, 07 Nov 2023 08:03:42 -0500
parents 2004b41d4a59
children 39521c47c7a3
line wrap: on
line source

#ifndef __core__session_h
#define __core__session_h

#include "core/config.h"
#include "gui/locale.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