// TestTiming.h
//
// Author David Barrett-Lennard
// (C)opyright Cedanet Pty Ltd 2019
#include "Ceda/cxUtils/TestTimer.h"
#include "Ceda/cxUtils/Tracer.h"
@def CEDA_TIME_CODE(desc,time,rate,maxCount,code) =
{
{
int N = ceda::CalculateTestCountFromRate(time, rate, maxCount);
ceda::MaxRateTimer t(desc,N);
ceda::HPTimer timeTaken;
while(timeTaken.GetElapsedTimeInSeconds() < time)
{
t.Begin();
for (int i=0 ; i < N ; ++i)
{
code
}
t.End();
}
}
}