Show chrono.h syntax highlighted
#ifndef __GEN_PROG_CHRONO_H__
#define __GEN_PROG_CHRONO_H__ 1
#include <boost/date_time/posix_time/posix_time.hpp>
namespace gen_prog
{
class chrono
{
public:
chrono() {}
virtual ~chrono() {}
void start() { _start_time = boost::posix_time::microsec_clock::universal_time(); }
void stop() { _end_time = boost::posix_time::microsec_clock::universal_time(); _end_time - _start_time; }
boost::posix_time::time_duration & duration() {return _duration_time;}
private:
boost::posix_time::ptime _start_time;
boost::posix_time::ptime _end_time;
boost::posix_time::time_duration _duration_time;
};
}
#endif // ** __GEN_PROG_CHRONO_H__ ** //
See more files for this project here