diff options
Diffstat (limited to 'src/ToolBox/superpmi/superpmi/cycletimer.cpp')
-rw-r--r-- | src/ToolBox/superpmi/superpmi/cycletimer.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ToolBox/superpmi/superpmi/cycletimer.cpp b/src/ToolBox/superpmi/superpmi/cycletimer.cpp index de0e19b935..7904e56fcb 100644 --- a/src/ToolBox/superpmi/superpmi/cycletimer.cpp +++ b/src/ToolBox/superpmi/superpmi/cycletimer.cpp @@ -8,8 +8,8 @@ CycleTimer::CycleTimer() { - start = 0; - stop = 0; + start = 0; + stop = 0; overhead = QueryOverhead(); } @@ -21,7 +21,7 @@ void CycleTimer::Start() { BOOL retVal = QueryThreadCycleTime(GetCurrentThread(), &start); - if(retVal == FALSE) + if (retVal == FALSE) { LogError("CycleTimer::Start unable to QPC. error was 0x%08x", ::GetLastError()); ::__debugbreak(); @@ -32,7 +32,7 @@ void CycleTimer::Stop() { BOOL retVal = QueryThreadCycleTime(GetCurrentThread(), &stop); - if(retVal == FALSE) + if (retVal == FALSE) { LogError("CycleTimer::Stop unable to QPC. error was 0x%08x", ::GetLastError()); ::__debugbreak(); @@ -49,12 +49,12 @@ unsigned __int64 CycleTimer::QueryOverhead() unsigned __int64 tot = 0; unsigned __int64 startCycles; unsigned __int64 endCycles; - const int N = 1000; + const int N = 1000; for (int i = 0; i < N; i++) { QueryThreadCycleTime(GetCurrentThread(), &startCycles); QueryThreadCycleTime(GetCurrentThread(), &endCycles); - tot += (endCycles-startCycles); + tot += (endCycles - startCycles); } - return tot/N; + return tot / N; }
\ No newline at end of file |