$treeview $search $mathjax
00001 #ifndef __STDAIR_BAS_BASCHRONOMETER_HPP 00002 #define __STDAIR_BAS_BASCHRONOMETER_HPP 00003 00004 // ////////////////////////////////////////////////////////////////////// 00005 // Import section 00006 // ////////////////////////////////////////////////////////////////////// 00007 // Boost (STL Extension) 00008 // Boost Date-Time (http://boost.org/doc/html/date_time/posix_time.html) 00009 #include <boost/date_time/posix_time/posix_time.hpp> 00010 00011 namespace stdair { 00012 00014 struct BasChronometer { 00016 BasChronometer(); 00017 00021 void start (); 00022 00024 std::string getStart () const { 00025 return boost::posix_time::to_simple_string (_startTime); 00026 } 00027 00030 double elapsed () const; 00031 00032 private: 00034 boost::posix_time::ptime _startTime; 00035 00037 bool _startTimeLaunched; 00038 }; 00039 00040 } 00041 #endif // __STDAIR_BAS_BASCHRONOMETER_HPP