diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-04-03 15:44:46 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-04-04 16:44:43 -0700 |
| commit | 23e3397b2f8336d374d06e2dd6ab7233c9873b77 (patch) | |
| tree | f1042922af466aff45be7f7ffb770e3ab7e9348c /toolsrc/src | |
| parent | cf3ee7c2a5adc88493f3a597a967bfcff369777f (diff) | |
| download | vcpkg-23e3397b2f8336d374d06e2dd6ab7233c9873b77.tar.gz vcpkg-23e3397b2f8336d374d06e2dd6ab7233c9873b77.zip | |
ElapsedTime: rename function to all_lower
Diffstat (limited to 'toolsrc/src')
| -rw-r--r-- | toolsrc/src/commands_build.cpp | 2 | ||||
| -rw-r--r-- | toolsrc/src/commands_ci.cpp | 8 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg.cpp | 2 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg_Chrono.cpp | 6 |
4 files changed, 9 insertions, 9 deletions
diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp index 91420ec4f..5b8e1403d 100644 --- a/toolsrc/src/commands_build.cpp +++ b/toolsrc/src/commands_build.cpp @@ -64,7 +64,7 @@ namespace vcpkg::Commands::Build const std::wstring command = Strings::wformat(LR"(%s && %s)", cmd_set_environment, cmd_launch_cmake); - const ElapsedTime timer = ElapsedTime::createStarted(); + const ElapsedTime timer = ElapsedTime::create_started(); int return_code = System::cmd_execute_clean(command); auto buildtimeus = timer.microseconds(); diff --git a/toolsrc/src/commands_ci.cpp b/toolsrc/src/commands_ci.cpp index d94949d4f..7a818337c 100644 --- a/toolsrc/src/commands_ci.cpp +++ b/toolsrc/src/commands_ci.cpp @@ -41,12 +41,12 @@ namespace vcpkg::Commands::CI std::vector<BuildResult> results; std::vector<std::chrono::milliseconds::rep> timing; - const ElapsedTime timer = ElapsedTime::createStarted(); + const ElapsedTime timer = ElapsedTime::create_started(); size_t counter = 0; const size_t package_count = install_plan.size(); for (const package_spec_with_install_plan& action : install_plan) { - const ElapsedTime build_timer = ElapsedTime::createStarted(); + const ElapsedTime build_timer = ElapsedTime::create_started(); counter++; System::println("Starting package %d/%d: %s", counter, package_count, action.spec.toString()); @@ -92,10 +92,10 @@ namespace vcpkg::Commands::CI System::println(System::color::error, "Error: Could not install package %s: %s", action.spec, e.what()); results.back() = BuildResult::NULLVALUE; } - System::println("Elapsed time for package %s: %s", action.spec, build_timer.toString()); + System::println("Elapsed time for package %s: %s", action.spec, build_timer.to_string()); } - System::println("Total time taken: %s", timer.toString()); + System::println("Total time taken: %s", timer.to_string()); for (size_t i = 0; i < results.size(); i++) { diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 4da0a585b..fe917cdd7 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -179,7 +179,7 @@ int wmain(const int argc, const wchar_t* const* const argv) if (argc == 0) std::abort(); - g_timer = ElapsedTime::createStarted(); + g_timer = ElapsedTime::create_started(); atexit([]() { auto elapsed_us = g_timer.microseconds(); diff --git a/toolsrc/src/vcpkg_Chrono.cpp b/toolsrc/src/vcpkg_Chrono.cpp index e39842df9..cfff1de07 100644 --- a/toolsrc/src/vcpkg_Chrono.cpp +++ b/toolsrc/src/vcpkg_Chrono.cpp @@ -49,14 +49,14 @@ namespace vcpkg return Strings::format("%.4g ns", nanos_as_double); } - ElapsedTime ElapsedTime::createStarted() + ElapsedTime ElapsedTime::create_started() { ElapsedTime t; - t.m_startTick = std::chrono::high_resolution_clock::now(); + t.m_start_tick = std::chrono::high_resolution_clock::now(); return t; } - std::string ElapsedTime::toString() const + std::string ElapsedTime::to_string() const { return format_time_userfriendly(elapsed<std::chrono::nanoseconds>()); } |
