snooze_win.hpp
Go to the documentation of this file.
00001 
00008 /*****************************************************************************
00009 ** Ifdefs
00010 *****************************************************************************/
00011 
00012 #ifndef ECL_TIME_SNOOZE_WIN_HPP_
00013 #define ECL_TIME_SNOOZE_WIN_HPP_
00014 
00015 /*****************************************************************************
00016 ** Platform Check
00017 *****************************************************************************/
00018 
00019 #include <ecl/config.hpp>
00020 #if defined(ECL_IS_WIN32)
00021 
00022 /*****************************************************************************
00023 ** Includes
00024 *****************************************************************************/
00025 
00026 #include "duration.hpp"
00027 #include <ecl/config/macros.hpp>
00028 #include <ecl/time_lite/types.hpp>
00029 #include "macros.hpp"
00030 
00031 /*****************************************************************************
00032 ** Namespaces
00033 *****************************************************************************/
00034 
00035 namespace ecl {
00036 
00037 /*****************************************************************************
00038 ** Classes [Snooze]
00039 *****************************************************************************/
00040 
00093 class ecl_time_PUBLIC Snooze {
00094 public:
00095         /*********************
00096         ** C&D's
00097         **********************/
00104         Snooze();
00118         Snooze (const Duration &time, const bool& validate = false );
00119         virtual ~Snooze() {}
00120 
00121         /*********************
00122         ** Usage Methods
00123         **********************/
00137         void period(const Duration &time, const bool& validate = false);
00145         Duration period() { return Duration(time_period.tv_sec,time_period.tv_nsec); }
00153         void initialise();
00164         void operator()();
00165 
00166 protected:
00167         /*********************
00168         ** Internal Methods
00169         **********************/
00176         void add_period();
00183         void validate();
00184 
00185         /*********************
00186         ** Internal Variables
00187         **********************/
00188         TimeStructure time_value;
00189         TimeStructure time_period;
00190         long wrap_value_ns;
00191         bool validate_times;
00192 
00193 };
00194 
00195 } // namespace ecl
00196 
00197 #endif /* ECL_IS_WIN32 */
00198 #endif /* ECL_TIME_SNOOZE_WIN_HPP_ */


ecl_time
Author(s): Daniel Stonier
autogenerated on Sun Oct 5 2014 23:35:32