diff options
| author | Rob Mensching <rob@firegiant.com> | 2024-01-10 23:53:18 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2024-01-11 18:24:06 -0800 |
| commit | 4e7b7c0059d76498d1c24f348dbf6d5799203fe0 (patch) | |
| tree | 1b00606cee7fd54ca4e07aa7b550fe63982220b3 /src/libs/dutil/WixToolset.DUtil/perfutil.cpp | |
| parent | 57b7689b2dc5e971911d1c6d48eebb5424ebca89 (diff) | |
| download | wix-4e7b7c0059d76498d1c24f348dbf6d5799203fe0.tar.gz wix-4e7b7c0059d76498d1c24f348dbf6d5799203fe0.tar.bz2 wix-4e7b7c0059d76498d1c24f348dbf6d5799203fe0.zip | |
Add pipeutil to dutil
Plus a couple small clean-ups in a couple of dutil files.
Diffstat (limited to '')
| -rw-r--r-- | src/libs/dutil/WixToolset.DUtil/perfutil.cpp | 10 |
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 | ||
