diff options
| -rw-r--r-- | toolsrc/include/vcpkg_System.h | 2 | ||||
| -rw-r--r-- | toolsrc/src/commands_installation.cpp | 2 | ||||
| -rw-r--r-- | toolsrc/src/main.cpp | 2 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg_System.cpp | 6 |
4 files changed, 6 insertions, 6 deletions
diff --git a/toolsrc/include/vcpkg_System.h b/toolsrc/include/vcpkg_System.h index f47fc9aab..c420464c1 100644 --- a/toolsrc/include/vcpkg_System.h +++ b/toolsrc/include/vcpkg_System.h @@ -64,7 +64,7 @@ namespace vcpkg {namespace System return println(c, Strings::format(messageTemplate, messageArgs...).c_str()); } - struct Stopwatch + struct Stopwatch2 { int64_t start_time, end_time, freq; diff --git a/toolsrc/src/commands_installation.cpp b/toolsrc/src/commands_installation.cpp index 6fe6aa9a1..7e7da9e3f 100644 --- a/toolsrc/src/commands_installation.cpp +++ b/toolsrc/src/commands_installation.cpp @@ -31,7 +31,7 @@ namespace vcpkg port_dir.generic_wstring(), ports_cmake_script_path.generic_wstring()); - System::Stopwatch timer; + System::Stopwatch2 timer; timer.start(); int return_code = System::cmd_execute(command); timer.stop(); diff --git a/toolsrc/src/main.cpp b/toolsrc/src/main.cpp index f3d68f5dd..2200cd105 100644 --- a/toolsrc/src/main.cpp +++ b/toolsrc/src/main.cpp @@ -153,7 +153,7 @@ static void loadConfig() } } -static System::Stopwatch g_timer; +static System::Stopwatch2 g_timer; static std::string trim_path_from_command_line(const std::string& full_command_line) { diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index 4dc37857d..cc7080069 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -90,20 +90,20 @@ namespace vcpkg {namespace System return ret; } - void Stopwatch::start() + void Stopwatch2::start() { static_assert(sizeof(start_time) == sizeof(LARGE_INTEGER), ""); QueryPerformanceCounter(reinterpret_cast<LARGE_INTEGER*>(&start_time)); } - void Stopwatch::stop() + void Stopwatch2::stop() { QueryPerformanceCounter(reinterpret_cast<LARGE_INTEGER*>(&end_time)); QueryPerformanceFrequency(reinterpret_cast<LARGE_INTEGER*>(&freq)); } - double Stopwatch::microseconds() const + double Stopwatch2::microseconds() const { return (reinterpret_cast<const LARGE_INTEGER*>(&end_time)->QuadPart - reinterpret_cast<const LARGE_INTEGER*>(&start_time)->QuadPart) * 1000000.0 / reinterpret_cast<const LARGE_INTEGER*>(&freq)->QuadPart; |
