.. _program_listing_file__tmp_ws_src_ecl_core_ecl_time_include_ecl_time_time_data.hpp: Program Listing for File time_data.hpp ====================================== |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/ecl_core/ecl_time/include/ecl/time/time_data.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /***************************************************************************** ** Ifdefs *****************************************************************************/ #ifndef ELC_TIME_TIME_DATA_HPP_ #define ELC_TIME_TIME_DATA_HPP_ /***************************************************************************** ** Includes *****************************************************************************/ #include #include #include "duration.hpp" #include "macros.hpp" /***************************************************************************** ** Namespaces *****************************************************************************/ namespace ecl { /***************************************************************************** ** Interface [TimeData] *****************************************************************************/ class ecl_time_PUBLIC TimeData { public: /********************* ** Collection **********************/ void push_back(const ecl::Duration& duration ) { durations.push_back(duration); } void clear() { durations.clear(); } /********************* ** Statistics **********************/ ecl::Duration average() const; ecl::Duration stdDev() const; ecl::Duration variance() const; private: std::vector durations; }; } // namespace ecl #endif /* ELC_TIME_TIME_DATA_HPP_ */