13 #if defined(ECL_IS_POSIX) 22 #include <ecl/config/ecl.hpp> 24 #include "../../include/ecl/time/timestamp_pos.hpp" 37 TimeStamp::TimeStamp() ecl_debug_throw_decl(StandardException) {
42 TimeStampBase(decimal_time_value)
45 TimeStamp::TimeStamp (
const time_t& seconds,
const long& nanoseconds)
ecl_assert_throw_decl(StandardException) :
46 TimeStampBase(seconds, nanoseconds)
49 TimeStamp::TimeStamp(
const TimeStampBase& base) : TimeStampBase(base) {}
55 const TimeStamp& TimeStamp::stamp() ecl_debug_throw_decl(StandardException) {
56 if ( epoch_time(time).flag() !=
NoError ) {
62 #if defined(ECL_HAS_RT_TIMERS) 63 TimeStamp TimeStamp::realtime_now() ecl_debug_throw_decl(StandardException) {
65 if ( realtime_epoch_time(time).flag() !=
NoError ) {
68 return TimeStamp(time.tv_sec, time.tv_nsec);
77 #ifdef ECL_HAS_EXCEPTIONS 81 StandardException throwTimeStampException(
const char* loc) {
82 int error_result = errno;
83 switch (error_result) {
88 std::ostringstream ostream;
89 ostream <<
"Unknown posix error " << error_result <<
": " << strerror(error_result) <<
".";
Embedded control libraries.
#define ecl_assert_throw_decl(exception)
#define ecl_debug_throw(exception)