Use tabs not spaces.
This commit is contained in:
parent
126816ef72
commit
9c6f6e143e
@ -15,13 +15,13 @@ public:
|
|||||||
Timer() {}
|
Timer() {}
|
||||||
|
|
||||||
void start() { m_start = clock(); }
|
void start() { m_start = clock(); }
|
||||||
void stop() { m_stop = clock(); }
|
void stop() { m_stop = clock(); }
|
||||||
|
|
||||||
int elapsed() const { return (1000 * (m_stop - m_start)) / CLOCKS_PER_SEC; }
|
int elapsed() const { return (1000 * (m_stop - m_start)) / CLOCKS_PER_SEC; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
clock_t m_start;
|
clock_t m_start;
|
||||||
clock_t m_stop;
|
clock_t m_stop;
|
||||||
};
|
};
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@ -35,21 +35,21 @@ class NVCORE_CLASS Timer
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Timer() {
|
Timer() {
|
||||||
// get the tick frequency from the OS
|
// get the tick frequency from the OS
|
||||||
QueryPerformanceFrequency((LARGE_INTEGER*) &m_frequency);
|
QueryPerformanceFrequency((LARGE_INTEGER*) &m_frequency);
|
||||||
}
|
}
|
||||||
|
|
||||||
void start() { QueryPerformanceCounter((LARGE_INTEGER*) &m_start); }
|
void start() { QueryPerformanceCounter((LARGE_INTEGER*) &m_start); }
|
||||||
void stop() { QueryPerformanceCounter((LARGE_INTEGER*) &m_stop); }
|
void stop() { QueryPerformanceCounter((LARGE_INTEGER*) &m_stop); }
|
||||||
|
|
||||||
int elapsed() const {
|
int elapsed() const {
|
||||||
return (int)1000 * ((double)m_stop.QuadPart - (double)m_start.QuadPart) / (double)m_frequency.QuadPart;
|
return (int)1000 * ((double)m_stop.QuadPart - (double)m_start.QuadPart) / (double)m_frequency.QuadPart;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LARGE_INTEGER m_frequency;
|
LARGE_INTEGER m_frequency;
|
||||||
LARGE_INTEGER m_start;
|
LARGE_INTEGER m_start;
|
||||||
LARGE_INTEGER m_stop;
|
LARGE_INTEGER m_stop;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user