long timeMin = LONG_MAX,
timeMax = 0,
timeTotal = 0;
- bool ok = true;
- for ( long a = 0; a < m_avgCount; a++ )
+ bool ok = func->Init();
+ for ( long a = 0; ok && a < m_avgCount; a++ )
{
wxStopWatch sw;
for ( long n = 0; n < m_numRuns && ok; n++ )
sw.Pause();
- if ( !ok )
- break;
-
const long t = sw.Time();
if ( t < timeMin )
timeMin = t;
timeTotal += t;
}
+ func->Done();
+
if ( !ok )
{
wxPrintf("ERROR\n");