.. _program_listing_file__tmp_ws_src_ecl_core_ecl_time_include_ecl_time_snooze_pos.hpp: Program Listing for File snooze_pos.hpp ======================================= |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/ecl_core/ecl_time/include/ecl/time/snooze_pos.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /***************************************************************************** ** Ifdefs *****************************************************************************/ #ifndef ECL_TIME_SNOOZE_POS_HPP_ #define ECL_TIME_SNOOZE_POS_HPP_ /***************************************************************************** ** Platform Check *****************************************************************************/ #include #if defined(ECL_IS_POSIX) /***************************************************************************** ** Includes *****************************************************************************/ #include "duration.hpp" #include #include #include "macros.hpp" /***************************************************************************** ** Namespaces *****************************************************************************/ namespace ecl { /***************************************************************************** ** Classes [Snooze] *****************************************************************************/ class ecl_time_PUBLIC Snooze { public: /********************* ** C&D's **********************/ Snooze(); Snooze (const Duration &time, const bool& validate = false ); virtual ~Snooze() {} /********************* ** Usage Methods **********************/ void period(const Duration &time, const bool& validate = false); Duration period() { return Duration(time_period.tv_sec,time_period.tv_nsec); } void initialise(); void operator()(); protected: /********************* ** Internal Methods **********************/ void add_period(); void validate(); /********************* ** Internal Variables **********************/ TimeStructure time_value; TimeStructure time_period; long wrap_value_ns; bool validate_times; }; } // namespace ecl #endif /* ECL_IS_POSIX */ #endif /* ECL_TIME_SNOOZE_POS_HPP_ */