posix_time_types.hpp 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* Copyright (c) 2002,2003 CrystalClear Software, Inc.
  2. * Use, modification and distribution is subject to the
  3. * Boost Software License, Version 1.0. (See accompanying
  4. * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  5. * Author: Jeff Garland
  6. */
  7. #ifndef POSIX_TIME_TYPES_HPP___
  8. #define POSIX_TIME_TYPES_HPP___
  9. #include "boost/date_time/time_clock.hpp"
  10. #include "boost/date_time/microsec_time_clock.hpp"
  11. #include "boost/date_time/posix_time/ptime.hpp"
  12. #if defined(BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES)
  13. #include "boost/date_time/posix_time/date_duration_operators.hpp"
  14. #endif
  15. #include "boost/date_time/posix_time/posix_time_duration.hpp"
  16. #include "boost/date_time/posix_time/posix_time_system.hpp"
  17. #include "boost/date_time/posix_time/time_period.hpp"
  18. #include "boost/date_time/time_iterator.hpp"
  19. #include "boost/date_time/dst_rules.hpp"
  20. namespace boost {
  21. //!Defines a non-adjusted time system with nano-second resolution and stable calculation properties
  22. namespace posix_time {
  23. //! Iterator over a defined time duration
  24. /*! \ingroup time_basics
  25. */
  26. typedef date_time::time_itr<ptime> time_iterator;
  27. //! A time clock that has a resolution of one second
  28. /*! \ingroup time_basics
  29. */
  30. typedef date_time::second_clock<ptime> second_clock;
  31. #ifdef BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK
  32. //! A time clock that has a resolution of one microsecond
  33. /*! \ingroup time_basics
  34. */
  35. typedef date_time::microsec_clock<ptime> microsec_clock;
  36. #endif
  37. //! Define a dst null dst rule for the posix_time system
  38. typedef date_time::null_dst_rules<ptime::date_type, time_duration> no_dst;
  39. //! Define US dst rule calculator for the posix_time system
  40. typedef date_time::us_dst_rules<ptime::date_type, time_duration> us_dst;
  41. } } //namespace posix_time
  42. #endif