OK ... which of these two is better, and why?
Example 1
Code:
void CHighResolutionTimer::SecondsElapsed(double *ElapsedTime)
{
QueryPerformanceCounter((LARGE_INTEGER*) &m_i64_ElapsedTime);
*ElapsedTime = double(m_i64_ElapsedTime - m_i64_StartTime) / double(m_i64_Frequency);
}
Example 2
Code:
double CHighResolutionTimer::SecondsElapsed(void)
{
QueryPerformanceCounter((LARGE_INTEGER*) &m_i64_ElapsedTime);
return double(m_i64_ElapsedTime - m_i64_StartTime) / double(m_i64_Frequency);
}
I could then call then like ...
CBlah.SecondsElapsed(&var);
or
var = CBlah.SecondsElapsed();
I'm interested in the performance rather than the readability.
Regards