34 #ifndef __AIS_TIMING_HPP__
35 #define __AIS_TIMING_HPP__
37 #include <boost/date_time/posix_time/posix_time_types.hpp>
68 inline double diff()
const;
77 inline double perf() ;
83 inline int count()
const;
90 inline void update(
int inc=1);
99 boost::posix_time::ptime m_start;
100 boost::posix_time::ptime m_end;
106 : m_start(boost::posix_time::microsec_clock::universal_time())
107 , m_end(boost::posix_time::microsec_clock::universal_time())
113 return (m_end - m_start).total_microseconds() / (double)1e6;
118 m_end = boost::posix_time::microsec_clock::universal_time();
126 return diff() / m_count ;
131 m_start = boost::posix_time::microsec_clock::universal_time();
132 m_end = boost::posix_time::microsec_clock::universal_time();