diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-03-04 06:25:05 -0800 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-03-04 06:25:05 -0800 |
| commit | 19695fc832f289e2e5ae08335d49bca568af8e27 (patch) | |
| tree | b89ec80349d2d43ce716e1e1ef9efb0c6a920017 /toolsrc/src/commands_build.cpp | |
| parent | 4806aaf460465b972ad1b6203ca744431b296ade (diff) | |
| download | vcpkg-19695fc832f289e2e5ae08335d49bca568af8e27.tar.gz vcpkg-19695fc832f289e2e5ae08335d49bca568af8e27.zip | |
[vcpkg] Deduplicate all timer classes.
Diffstat (limited to 'toolsrc/src/commands_build.cpp')
| -rw-r--r-- | toolsrc/src/commands_build.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp index e51d519f8..02b98e28d 100644 --- a/toolsrc/src/commands_build.cpp +++ b/toolsrc/src/commands_build.cpp @@ -6,6 +6,7 @@ #include "PostBuildLint.h" #include "vcpkg_Dependencies.h" #include "vcpkg_System.h" +#include "vcpkg_Chrono.h" #include "vcpkg_Environment.h" #include "metrics.h" #include "vcpkg_Enums.h" @@ -53,11 +54,11 @@ namespace vcpkg::Commands::Build port_dir.generic_wstring(), ports_cmake_script_path.generic_wstring()); - System::Stopwatch2 timer; - timer.start(); + ElapsedTime timer = ElapsedTime::createStarted(); + int return_code = System::cmd_execute(command); - timer.stop(); - TrackMetric("buildtimeus-" + spec.toString(), timer.microseconds()); + auto buildtimeus = timer.microseconds(); + TrackMetric("buildtimeus-" + spec.toString(), buildtimeus); if (return_code != 0) { |
