30 #define __TimerMap_H 1
32 #include <boost/timer.hpp>
36 struct TimerPair :
public std::pair<boost::timer, double>
42 second = first.elapsed();
47 second += first.elapsed();
67 class TimerMap :
public std::map<std::string, TimerPair>
69 typedef std::map<std::string, TimerPair> super;
78 typedef super::iterator iterator;
79 typedef super::const_iterator const_iterator;
118 template<
typename PrefixType>
119 void report( PrefixType
const& prefix )
123 for ( it=this->begin(); it!=this->end(); ++it )
125 VLOG(1) << prefix <<
" " << it->first <<
": " << it->second.second <<
"\n";