21 #ifndef bempp_auto_timer_hpp
22 #define bempp_auto_timer_hpp
27 #include <tbb/tick_count.h>
41 m_text(text), m_start(tbb::tick_count::now())
45 explicit AutoTimer(
const std::string& text = std::string()) :
46 m_text(text), m_start(tbb::tick_count::now())
52 tbb::tick_count end = tbb::tick_count::now();
53 std::cout << m_text << (end - m_start).seconds() <<
" s" << std::endl;
58 tbb::tick_count m_start;
AutoTimer(const std::string &text=std::string())
Definition: auto_timer.hpp:45
AutoTimer(const char *text=0)
Constructor.
Definition: auto_timer.hpp:40
Timer that on destruction outputs the time elapsed since construction.
Definition: auto_timer.hpp:34
~AutoTimer()
Destructor. Print the previously specified message.
Definition: auto_timer.hpp:50