aboutsummaryrefslogtreecommitdiff
path: root/src/libs/dutil/WixToolset.DUtil/perfutil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/dutil/WixToolset.DUtil/perfutil.cpp')
-rw-r--r--src/libs/dutil/WixToolset.DUtil/perfutil.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/perfutil.cpp b/src/libs/dutil/WixToolset.DUtil/perfutil.cpp
index bc138d34..f556ce79 100644
--- a/src/libs/dutil/WixToolset.DUtil/perfutil.cpp
+++ b/src/libs/dutil/WixToolset.DUtil/perfutil.cpp
@@ -39,7 +39,9 @@ extern "C" void DAPI PerfInitialize(
39 vdFrequency = 1000; // ticks are measured in milliseconds 39 vdFrequency = 1000; // ticks are measured in milliseconds
40 } 40 }
41 else 41 else
42 {
42 vdFrequency = static_cast<double>(liFrequency.QuadPart); 43 vdFrequency = static_cast<double>(liFrequency.QuadPart);
44 }
43} 45}
44 46
45 47
@@ -57,15 +59,23 @@ extern "C" void DAPI PerfClickTime(
57 LARGE_INTEGER* pli = pliElapsed; 59 LARGE_INTEGER* pli = pliElapsed;
58 60
59 if (!pli) // if elapsed time time was not requested, reset the start time 61 if (!pli) // if elapsed time time was not requested, reset the start time
62 {
60 pli = &liStart; 63 pli = &liStart;
64 }
61 65
62 if (vfHighPerformanceCounter) 66 if (vfHighPerformanceCounter)
67 {
63 ::QueryPerformanceCounter(pli); 68 ::QueryPerformanceCounter(pli);
69 }
64 else 70 else
71 {
65 pli->QuadPart = ::GetTickCount(); 72 pli->QuadPart = ::GetTickCount();
73 }
66 74
67 if (pliElapsed) 75 if (pliElapsed)
76 {
68 pliElapsed->QuadPart -= liStart.QuadPart; 77 pliElapsed->QuadPart -= liStart.QuadPart;
78 }
69} 79}
70 80
71 81