33 #include <boost/timer.hpp>
34 #include <boost/format.hpp>
75 boost::timer totalTime;
88 std::size_t proceduresDone = 0;
91 for (
int procIndex = 0; procIndex <
program.procedureCount();
95 if (proceduresToProcess.size() > 0 &&
96 proceduresToProcess.find(proc.
name()) ==
97 proceduresToProcess.end())
100 if (proceduresToIgnore.size() > 0 &&
101 proceduresToIgnore.find(proc.
name()) !=
102 proceduresToIgnore.end())
106 boost::timer currentTime;
107 std::size_t totalProcedures = 0;
110 if (proceduresToProcess.size() > 0) {
111 totalProcedures = proceduresToProcess.size();
113 totalProcedures =
program.procedureCount();
116 totalProcedures -= proceduresToIgnore.size();
119 <<
"procedure: " << proc.
name()
120 << (boost::format(
" (%d/%d)")
121 % (proceduresDone + 1) % totalProcedures).str();
127 double cur = currentTime.elapsed();
128 double tot = totalTime.elapsed();
129 long currentElapsed =
static_cast<long>(cur);
130 long totalElapsed =
static_cast<long>(tot);
133 (tot / proceduresDone) *
134 (totalProcedures - proceduresDone));
137 " %d min %d s. Total %d min %d s. ETA in %d min %d s")
138 % (currentElapsed / 60) % (currentElapsed % 60)
139 % (totalElapsed / 60) % (totalElapsed % 60)
140 % (eta / 60) % (eta % 60)).str()
150 if (procPass != NULL) {
153 abortWithError(
"Program pass is not also a procedure pass so you "
154 "must overload handleProgram method!");