12 #ifndef ECL_TIME_SLEEP_WIN_HPP_ 13 #define ECL_TIME_SLEEP_WIN_HPP_ 20 #if defined(ECL_IS_WIN32) 83 Sleep(
const unsigned long &seconds = 0);
93 void operator()() ecl_assert_throw_decl(StandardException);
125 TimeStructure required, remaining;
154 MilliSleep(
const unsigned long &milliseconds = 0);
156 virtual ~MilliSleep() {}
165 void operator()() ecl_assert_throw_decl(StandardException);
186 TimeStructure required, remaining;
215 MicroSleep(
const unsigned long µseconds = 0);
217 virtual ~MicroSleep() {}
227 void operator()() ecl_assert_throw_decl(StandardException);
247 TimeStructure required, remaining;
276 NanoSleep(
const unsigned long &nanoseconds = 0);
278 virtual ~NanoSleep() {}
288 void operator()() ecl_assert_throw_decl(StandardException);
308 TimeStructure required, remaining;
318 #if defined(ECL_HAS_EXCEPTIONS) 333 int error_result = errno;
334 switch (error_result) {
336 case ( EINVAL ) :
return StandardException(loc,
ecl::InvalidInputError,
"Specified value was negative or exceeded resolution range.\n\n Sleep: [N/A]\n MilliSleep: [0-1000]\n MicroSleep: [0-1x10^6]\n NanoSleep: [0-1x10^9]\n");
337 case ( EFAULT ) :
return StandardException(loc,
ecl::MemoryError,
"Memory error.");
340 std::ostringstream ostream;
341 ostream <<
"Unknown error " << error_result <<
": " << strerror(error_result) <<
".";
342 return StandardException(loc,
UnknownError, ostream.str());
Embedded control libraries.
Cross-platform header inclusions for the duration typedefs.
#define ecl_assert_throw_decl(exception)
TimeStamp Duration
Convenience typedef to associate timestamps with the concept of durations.