#include "HQTime.h"
#include <stdio.h>
#include <omp.h>

CHQTime::CHQTime(void)
{
	m_StartTime = m_LastTime = omp_get_wtime();
}

CHQTime::~CHQTime(void)
{
}

void CHQTime::LapTime(const char *disp)
{
	double curTime = omp_get_wtime();
#ifdef SHOW_TIME
	printf("Lap time for %s : %.2f ms\n", disp, (curTime - m_LastTime) * 1000.0);
#endif // SHOW_TIME
	m_LastTime = curTime;
}

void CHQTime::CheckTime(const char *disp)
{
	double curTime = omp_get_wtime();

#ifdef SHOW_TIME
	printf("Total time for %s : %.2f ms\n", disp, (curTime - m_StartTime) * 1000.0);
#endif // SHOW_TIME
}
