time_data.hpp
Go to the documentation of this file.
00001 
00008 /*****************************************************************************
00009 ** Ifdefs
00010 *****************************************************************************/
00011 
00012 #ifndef ELC_TIME_TIME_DATA_HPP_
00013 #define ELC_TIME_TIME_DATA_HPP_
00014 
00015 /*****************************************************************************
00016 ** Includes
00017 *****************************************************************************/
00018 
00019 #include <vector>
00020 #include <ecl/config/macros.hpp>
00021 #include <ecl/time/duration.hpp>
00022 
00023 /*****************************************************************************
00024 ** Namespaces
00025 *****************************************************************************/
00026 
00027 namespace ecl {
00028 
00029 /*****************************************************************************
00030 ** Interface [TimeData]
00031 *****************************************************************************/
00038 class ECL_PUBLIC TimeData {
00039 public:
00040         /*********************
00041         ** Collection
00042         **********************/
00048         void push_back(const ecl::Duration& duration ) { durations.push_back(duration); }
00052         void clear() { durations.clear(); }
00053 
00054         /*********************
00055         ** Statistics
00056         **********************/
00061         ecl::Duration average() const;
00066         ecl::Duration stdDev() const;
00071         ecl::Duration variance() const;
00072 
00073 private:
00074         std::vector<ecl::Duration> durations;
00075 };
00076 
00077 } // namespace ecl
00078 
00079 #endif /* ELC_TIME_TIME_DATA_HPP_ */


ecl_time
Author(s): Daniel Stonier (d.stonier@gmail.com)
autogenerated on Thu Jan 2 2014 11:12:43