123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- #ifndef BOOST_LOG_ATTRIBUTES_TIME_TRAITS_HPP_INCLUDED_
- #define BOOST_LOG_ATTRIBUTES_TIME_TRAITS_HPP_INCLUDED_
- #include <boost/date_time/posix_time/posix_time_types.hpp>
- #include <boost/log/detail/config.hpp>
- #include <boost/log/detail/header.hpp>
- #ifdef BOOST_HAS_PRAGMA_ONCE
- #pragma once
- #endif
- namespace boost {
- BOOST_LOG_OPEN_NAMESPACE
- namespace attributes {
- struct basic_time_traits
- {
-
- typedef posix_time::ptime time_type;
-
- #if defined(BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK)
- typedef posix_time::microsec_clock clock_source;
- #else
- typedef posix_time::second_clock clock_source;
- #endif
- };
- struct utc_time_traits :
- public basic_time_traits
- {
-
- static time_type get_clock()
- {
- return clock_source::universal_time();
- }
- };
- struct local_time_traits :
- public basic_time_traits
- {
-
- static time_type get_clock()
- {
- return clock_source::local_time();
- }
- };
- }
- BOOST_LOG_CLOSE_NAMESPACE
- }
- #include <boost/log/detail/footer.hpp>
- #endif
|