timestamp_pos.hpp
Go to the documentation of this file.
1 
8 /*****************************************************************************
9 ** Ifdefs
10 *****************************************************************************/
11 
12 #ifndef ECL_TIME_STAMP_POS_HPP_
13 #define ECL_TIME_STAMP_POS_HPP_
14 
15 /*****************************************************************************
16 ** Platform Check
17 *****************************************************************************/
18 
19 #include <ecl/config.hpp>
20 #if defined(ECL_IS_POSIX)
21 #define ECL_HAS_TIMESTAMP
22 
23 /*****************************************************************************
24 ** Includes
25 *****************************************************************************/
26 
27 #include <time.h>
28 #include <ecl/config/macros.hpp>
32 #include "timestamp_base.hpp"
33 
34 /*****************************************************************************
35 ** Namespaces
36 *****************************************************************************/
37 
38 namespace ecl {
39 
40 /*****************************************************************************
41 ** Interface [Time]
42 *****************************************************************************/
43 
90 class ecl_time_PUBLIC TimeStamp : public TimeStampBase {
91 public:
92  /*********************
93  ** Constructors
94  **********************/
104  TimeStamp();
115  TimeStamp (const double& decimal_time_value);
126  TimeStamp (const time_t &seconds, const long &nanoseconds);
136  TimeStamp (const TimeStampBase& base);
137 
138  virtual ~TimeStamp() {}
139 
140  /******************************************
141  ** Stamps
142  *******************************************/
143  using TimeStampBase::stamp;
150  const TimeStamp& stamp();
151 #if defined(ECL_HAS_RT_TIMERS)
152 
159  static TimeStamp realtime_now();
160 #endif
161 };
162 
163 
164 
165 }; // namespace ecl
166 
167 #ifdef ECL_HAS_EXCEPTIONS
168 namespace ecl {
169 namespace time {
170 
177 ecl::StandardException throwTimeStampException(const char*loc);
178 
179 } // namespace time
180 }; // namespace ecl
181 
182 #endif /* ECL_HAS_EXCEPTIONS */
183 
184 
185 #endif /* ECL_IS_POSIX */
186 #endif /* ECL_TIME_STAMP_POS_HPP_ */
portable_types.hpp
timestamp_base.hpp
Base class with common functionality across platforms for timestamps.
ecl::StandardException
config.hpp
standard_exception.hpp
ecl_time_PUBLIC
#define ecl_time_PUBLIC
Definition: macros.hpp:37
ecl::TimeStampBase::stamp
const TimeStampBase & stamp(const double &decimal_time_value)
Manually set the timestamp.
Definition: timestamp_base.cpp:50
macros.hpp
ecl
Embedded control libraries.


ecl_time
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:19