CSC3224_Computer_Games_Development / GameEngine / Engine_Profiler / Profiler.h
Profiler.h
Raw
#pragma once
#include <iostream>
#include <sstream>
#include <SFML/System/Clock.hpp>
// Profiler for assessing Engine Systems 
class Profiler
{
public:
	Profiler() {}
	~Profiler() {}
	sf::Clock clock;
	sf::Time timeElapsed;


	void startTime() {
		clock.restart();
	}

	void stopTimes() {
		timeElapsed = clock.getElapsedTime();
	}

	sf::Time finishProfiler() {
		return timeElapsed = clock.getElapsedTime();
	}

	float asMicroseconds() {
		return timeElapsed.asMicroseconds();
	}

	float asMilliseconds() {
		return timeElapsed.asMilliseconds();
	}

	float asSeconds() {
		return timeElapsed.asSeconds();
	}

	sf::Time Zero() {

		return timeElapsed.Zero;
	}
	
};