<commit_before>#ifndef __TIMER_H__
#define __TIMER_H__

#include "SDL/include/SDL.h"

class SimpleTimer
{
public:
	SimpleTimer()
	{
		pausedTicks = 0, runTicks = 0;
		running = false;
	}

	void Start()
	{
		running = true;
		runTicks = SDL_GetTicks();
	}

	void Stop()
	{
		if(running)
		{
			running = false;
			pausedTicks = SDL_GetTicks() - runTicks;
		}
	}

	void Resume()
	{
		if(!running)
		{
			running = true;
			runTicks = SDL_GetTicks() - pausedTicks;
			pausedTicks = 0;
		}
	}

	void Clear()
	{
		running = false;
		runTicks = 0;
		pausedTicks = 0;
	}

	int GetTimerTicks() const
	{
		if (running)
			return SDL_GetTicks() - runTicks;
		return 0;
	}

	bool IsRunning() const
	{
		return running;
	}

private:
	int pausedTicks, runTicks;
	bool running;
};


#endif // __TIMER_H__<commit_msg>Change int to unsigned int<commit_after>#ifndef __TIMER_H__
#define __TIMER_H__

#include "SDL/include/SDL.h"

class SimpleTimer
{
public:
	SimpleTimer()
	{
		pausedTicks = 0, runTicks = 0;
		running = false;
	}

	void Start()
	{
		running = true;
		runTicks = SDL_GetTicks();
	}

	int Stop()
	{
		if(running)
		{
			running = false;
			return pausedTicks = SDL_GetTicks() - runTicks;
		}
		return 0;
	}

	void Resume()
	{
		if(!running)
		{
			running = true;
			runTicks = SDL_GetTicks() - pausedTicks;
			pausedTicks = 0;
		}
	}

	void Clear()
	{
		running = false;
		runTicks = 0;
		pausedTicks = 0;
	}

	unsigned int GetTimerTicks() const
	{
		if (running)
			return SDL_GetTicks() - runTicks;
		return 0;
	}

	unsigned int GetPausedTicks() const
	{
		if (!running)
			return pausedTicks;
		return 0;
	}

	bool IsRunning() const
	{
		return running;
	}

private:
	unsigned int pausedTicks, runTicks;
	bool running;
};


#endif // __TIMER_H__
{'fraction_non_alphanumeric': 0.12128146453089245, 'fraction_numerical': 0.008009153318077803, 'mean_word_length': 3.039260969976905, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3908911', 'n_tokens_mistral': 831, 'n_tokens_neox': 720, 'n_words': 160}