RMOL Logo Get Revenue Management Optimisation Library at SourceForge.net. Fast, secure and Free Open Source software downloads

BasChronometer.hpp

Go to the documentation of this file.
00001 #ifndef __RMOL_COM_BAS_BASCHRONOMETER_HPP
00002 #define __RMOL_COM_BAS_BASCHRONOMETER_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // Boost Date-Time (http://boost.org/doc/html/date_time/posix_time.html)
00008 #include <boost/date_time/posix_time/posix_time.hpp>
00009 
00010 namespace RMOL {
00011 
00013   struct BasChronometer {
00015     BasChronometer();
00016       
00020     void start ();
00021     
00023     std::string getStart () const {
00024       return boost::posix_time::to_simple_string (_startTime);
00025     }
00026     
00029     double elapsed () const;
00030     
00031   private:
00033     boost::posix_time::ptime _startTime;
00034 
00036     bool _startTimeLaunched;
00037   };
00038 
00039 }
00040 #endif // __RMOL_COM_BAS_BASCHRONOMETER_HPP
SourceForge Logo

Generated on Sat Jun 6 13:49:02 2009 for RMOL by Doxygen 1.5.7.1