<commit_before>#ifndef MEASUREDTIMER_H
#define MEASUREDTIMER_H

#include <QObject>
#include <QTime>
#include <QTimer>

QT_BEGIN_NAMESPACE
class QWidget;
class QEvent;
QT_END_NAMESPACE



class MeasuredTimer : public QObject
{
	Q_OBJECT

	const int msec;
	QTime time;
	QTimer timer;
public:
	static const int DEFAULT_RATE = 60;

	MeasuredTimer(QObject* const parent = 0, const int msec = 1000 / DEFAULT_RATE);

	void startOnShow(QWidget* const widget);
	bool eventFilter(QObject* obj, QEvent* event);
signals:
	void timeout(const float& elapsed);
public slots:
	void start();
	void stop();<commit_msg>Changed from QTime to QElapsedTimer so we don't go on epic journeys when the system clock changes<commit_after>#ifndef MEASUREDTIMER_H
#define MEASUREDTIMER_H

#include <QObject>
#include <QElapsedTimer>
#include <QTimer>

QT_BEGIN_NAMESPACE
class QWidget;
class QEvent;
QT_END_NAMESPACE



class MeasuredTimer : public QObject
{
	Q_OBJECT

	const int msec;
	QElapsedTimer time;
	QTimer timer;
public:
	static const int DEFAULT_RATE = 60;

	MeasuredTimer(QObject* const parent = 0, const int msec = 1000 / DEFAULT_RATE);

	void startOnShow(QWidget* const widget);
	bool eventFilter(QObject* obj, QEvent* event);
signals:
	void timeout(const float& elapsed);
public slots:
	void start();
	void stop();
{'fraction_non_alphanumeric': 0.08384615384615385, 'fraction_numerical': 0.010769230769230769, 'mean_word_length': 5.740932642487047, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7087996', 'n_tokens_mistral': 480, 'n_tokens_neox': 445, 'n_words': 141}