#ifndef _PERFORMANCETEST_H
#define _PERFORMANCETEST_H

typedef struct PerformanceTestDesc_t
{
  unsigned long long startCycle;
  unsigned long long stopCycle;
  unsigned long long deltaCycles;
  unsigned int deltaMicroSeconds;
  unsigned long long errorCycles;
}
PerformanceTestDesc;

typedef struct PerformanceTestDesc_t* PerformanceTest;

// Initialization is very important, it should be performed just
// before the call to startPerformanceTest, so that the startCycle
// variable is in L1 cache !
void initPerformanceTest(PerformanceTest this);
inline void startPerformanceTest(PerformanceTest this);
inline void stopPerformanceTest(PerformanceTest this);

#endif _PERFORMANCETEST_H
