From 46d6e1fd3dbe0bc116a46fdab91b40fe2ecd6803 Mon Sep 17 00:00:00 2001 From: redpony Date: Mon, 20 Sep 2010 18:50:30 +0000 Subject: support turning off verbose logging git-svn-id: https://ws10smt.googlecode.com/svn/trunk@652 ec762483-ff6d-05da-a07a-a48fb63a330f --- utils/timing_stats.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'utils/timing_stats.cc') diff --git a/utils/timing_stats.cc b/utils/timing_stats.cc index fc8e9df1..dc90bf53 100644 --- a/utils/timing_stats.cc +++ b/utils/timing_stats.cc @@ -2,6 +2,9 @@ #include #include "time.h" //cygwin needs + +#include "verbose.h" + using namespace std; map Timer::stats; @@ -16,8 +19,10 @@ Timer::~Timer() { } void Timer::Summarize() { - for (map::iterator it = stats.begin(); it != stats.end(); ++it) { - cerr << it->first << ": " << it->second.total_time << " secs (" << it->second.calls << " calls)\n"; + if (!SILENT) { + for (map::iterator it = stats.begin(); it != stats.end(); ++it) { + cerr << it->first << ": " << it->second.total_time << " secs (" << it->second.calls << " calls)\n"; + } } stats.clear(); } -- cgit v1.2.3