<commit_before>#include "Application.h"
#include "OpenGL.h"

#include "GameState.h"
#include "MenuState.h"
#include "TestState.h"

#include <sys/time.h>

static int64_t getMicroseconds()
{
	timeval tv;
	gettimeofday(&tv, NULL);
	return tv.tv_sec * 1000000L + tv.tv_usec;
}

Application::Application() : m_initialized(false)
{
}

Application::~Application()
{
}

void Application::update(float width, float height)
{
	if(!m_initialized)
	{
		m_stateMachine.addState("game", new GameState);<commit_msg>Added a win32 implementation of time.<commit_after>#include "Application.h"
#include "OpenGL.h"

#include "GameState.h"
#include "MenuState.h"
#include "TestState.h"

#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN 1
#include <Windows.h>
static int64_t s_frequency = 0;
#else
#include <sys/time.h>
#endif

static int64_t getMicroseconds()
{
#ifdef _WIN32
	int64_t counter;
	QueryPerformanceCounter((LARGE_INTEGER*)&counter);
	return counter * 1000 / (s_frequency / 1000);
#else
	timeval tv;
	gettimeofday(&tv, NULL);
	return tv.tv_sec * 1000000L + tv.tv_usec;
#endif
}

Application::Application() : m_initialized(false)
{
#ifdef _WIN32
	QueryPerformanceFrequency((LARGE_INTEGER*)&s_frequency);
#endif
}

Application::~Application()
{
}

void Application::update(float width, float height)
{
	if(!m_initialized)
	{
		m_stateMachine.addState("game", new GameState);
{'fraction_non_alphanumeric': 0.13927781871775977, 'fraction_numerical': 0.030950626381724394, 'mean_word_length': 6.420765027322404, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '6306452', 'n_tokens_mistral': 535, 'n_tokens_neox': 501, 'n_words': 103}