time_data.hpp
Go to the documentation of this file.
1 
8 /*****************************************************************************
9 ** Ifdefs
10 *****************************************************************************/
11 
12 #ifndef ELC_TIME_TIME_DATA_HPP_
13 #define ELC_TIME_TIME_DATA_HPP_
14 
15 /*****************************************************************************
16 ** Includes
17 *****************************************************************************/
18 
19 #include <vector>
20 #include <ecl/config/macros.hpp>
21 #include <ecl/time/duration.hpp>
22 #include "macros.hpp"
23 
24 /*****************************************************************************
25 ** Namespaces
26 *****************************************************************************/
27 
28 namespace ecl {
29 
30 /*****************************************************************************
31 ** Interface [TimeData]
32 *****************************************************************************/
39 class ecl_time_PUBLIC TimeData {
40 public:
41  /*********************
42  ** Collection
43  **********************/
49  void push_back(const ecl::Duration& duration ) { durations.push_back(duration); }
53  void clear() { durations.clear(); }
54 
55  /*********************
56  ** Statistics
57  **********************/
62  ecl::Duration average() const;
67  ecl::Duration stdDev() const;
72  ecl::Duration variance() const;
73 
74 private:
75  std::vector<ecl::Duration> durations;
76 };
77 
78 } // namespace ecl
79 
80 #endif /* ELC_TIME_TIME_DATA_HPP_ */
#define ecl_time_PUBLIC
Definition: time/macros.hpp:37
TimeStamp Duration


xbot_node
Author(s): Roc, wangpeng@droid.ac.cn
autogenerated on Sat Oct 10 2020 03:28:13