include
ecl
time
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_ */
macros.hpp
Macros for ecl time.
ecl::Duration
TimeStamp Duration
Convenience typedef to associate timestamps with the concept of durations.
Definition:
duration.hpp:47
ecl_time_PUBLIC
#define ecl_time_PUBLIC
Definition:
macros.hpp:37
macros.hpp
ecl
Embedded control libraries.
duration.hpp
Cross-platform header inclusions for the duration typedefs.
ecl_time
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:19