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() ecl_debug_throw_decl(StandardException);
115  TimeStamp (const double& decimal_time_value) ecl_assert_throw_decl(StandardException);
126  TimeStamp (const time_t &seconds, const long &nanoseconds) ecl_assert_throw_decl(StandardException);
136  TimeStamp (const TimeStampBase& base);
137 
138  virtual ~TimeStamp() {}
139 
140  /******************************************
141  ** Stamps
142  *******************************************/
143  using TimeStampBase::stamp;
150  const TimeStamp& stamp() ecl_debug_throw_decl(StandardException);
151 #if defined(ECL_HAS_RT_TIMERS)
152 
159  static TimeStamp realtime_now() ecl_debug_throw_decl(StandardException);
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_ */
Embedded control libraries.
Base class with common functionality across platforms for timestamps.
const TimeStampBase & stamp(const double &decimal_time_value) ecl_assert_throw_decl(StandardException)
Manually set the timestamp.
#define ecl_time_PUBLIC
Definition: macros.hpp:37


ecl_time
Author(s): Daniel Stonier
autogenerated on Mon Jun 10 2019 13:08:15