
#include "Timestamp.h"
#include <Windows.h>


unsigned long long Timestamp::Get(void)
{
	LARGE_INTEGER now = {};
	::QueryPerformanceCounter(&now);

	return static_cast<unsigned long long>(now.QuadPart);
}


double Timestamp::ToSeconds(unsigned long long count)
{
	LARGE_INTEGER frequency = {};
	::QueryPerformanceFrequency(&frequency);

	return static_cast<double>(count) / static_cast<double>(frequency.QuadPart);
}
