IspDbgTimer(char const*const pszTitle) : mpszName(pszTitle) , mIdx(0) , mi4StartUs(getUs()) , mi4LastUs(getUs()) { }
inline MBOOL ProfilingPrint(char const*const pszInfo = "") const { MINT32 const i4EndUs = getUs(); // if (0==mIdx) // { // ISP_FUNC_INF("[%s] %s:(%d-th) ===> %.06f ms", mpszName, pszInfo, mIdx++, (float)(i4EndUs-mi4StartUs)/1000); // } // else // { LOG_INF("[%s] %s:(%d-th) ===> %.06f ms (Total time till now: %.06f ms)", mpszName, pszInfo, mIdx++, (float)(i4EndUs-mi4LastUs)/1000, (float)(i4EndUs-mi4StartUs)/1000); // } mi4LastUs = i4EndUs; //sleep(4); //wait 1 sec for AE stable return MTRUE; }
long getTimeDiffInUs(struct timeval t_start, struct timeval t_end) { return getUs(t_end) - getUs(t_start); }