diff options
Diffstat (limited to 'src/build.cc')
-rw-r--r-- | src/build.cc | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/build.cc b/src/build.cc index 157442d..65aa6a9 100644 --- a/src/build.cc +++ b/src/build.cc @@ -16,6 +16,7 @@ #include <assert.h> #include <stdio.h> +#include <stdlib.h> #ifdef _WIN32 #include <windows.h> @@ -23,7 +24,6 @@ #include <unistd.h> #include <sys/ioctl.h> #include <sys/time.h> -#include <sys/termios.h> #endif #include "build_log.h" @@ -36,7 +36,6 @@ BuildStatus::BuildStatus(const BuildConfig& config) : config_(config), start_time_millis_(GetTimeMillis()), - last_update_millis_(start_time_millis_), started_edges_(0), finished_edges_(0), total_edges_(0), have_blank_line_(true), progress_status_format_(NULL) { #ifndef _WIN32 @@ -85,7 +84,6 @@ void BuildStatus::BuildEdgeFinished(Edge* edge, RunningEdgeMap::iterator i = running_edges_.find(edge); *start_time = i->second; *end_time = (int)(now - start_time_millis_); - int total_time = end_time - start_time; running_edges_.erase(i); if (config_.verbosity == BuildConfig::QUIET) @@ -94,15 +92,7 @@ void BuildStatus::BuildEdgeFinished(Edge* edge, if (smart_terminal_) PrintStatus(edge); - if (success && output.empty()) { - if (!smart_terminal_) { - if (total_time > 5*1000) { - printf("%.1f%% %d/%d\n", finished_edges_ * 100 / (float)total_edges_, - finished_edges_, total_edges_); - last_update_millis_ = now; - } - } - } else { + if (!success || !output.empty()) { if (smart_terminal_) printf("\n"); |