Old fashion design for PC-104
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

37 lines
1.1 KiB

//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright © 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 08/10/2003
// PROJECT: Laserguard libraries
// SUBSYSTEM: LgLib
// FILE: LgPerformanceCounter.h
// AUTHOR: Chizhevskiy Sergey
// OVERVIEW
// ~~~~~~~~
// Header file of CLgPerformanceCounter
//----------------------------------------------------------------------------
#ifndef __LG__PERFORMANCE__COUNTER__H__INCLUDED__
#define __LG__PERFORMANCE__COUNTER__H__INCLUDED__
class CLgPerformanceCounter
{
public:
CLgPerformanceCounter();
~CLgPerformanceCounter();
public:
void Begin() { ::QueryPerformanceCounter( &m_PerformanceCounter[0] ); }
double End()
{
::QueryPerformanceCounter( &m_PerformanceCounter[1] );
return ((double)m_PerformanceCounter[1].QuadPart -
(double)m_PerformanceCounter[0].QuadPart) /
(double)m_PerformanceFriquency.QuadPart;
}
private:
LARGE_INTEGER m_PerformanceFriquency;
LARGE_INTEGER m_PerformanceCounter[2];
};
#endif