switch to git no-history version

This commit is contained in:
AndreaRigoni
2018-04-17 15:39:10 +02:00
commit b14311ce09
274 changed files with 27340 additions and 0 deletions

28
src/Core/Timer.h Normal file
View File

@@ -0,0 +1,28 @@
#ifndef TIMER_H
#define TIMER_H
#include <sys/time.h>
////////////////////////////////////////////////////////////////////////////////
// Timer /////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
class Timer
{
public:
void Start() { gettimeofday(&m_start, NULL); }
double StopWatch() {
gettimeofday(&m_end, NULL);
double timeSec = m_end.tv_sec - m_start.tv_sec +
(m_end.tv_usec - m_start.tv_usec)*1E-6;
return timeSec;
}
private:
struct timeval m_start, m_end;
};
#endif // TIMER_H