File indexing completed on 2025-01-18 09:39:19
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef BOOST_LOG_ATTRIBUTES_TIME_TRAITS_HPP_INCLUDED_
0017 #define BOOST_LOG_ATTRIBUTES_TIME_TRAITS_HPP_INCLUDED_
0018
0019 #include <boost/date_time/posix_time/posix_time_types.hpp>
0020 #include <boost/log/detail/config.hpp>
0021 #include <boost/log/detail/header.hpp>
0022
0023 #ifdef BOOST_HAS_PRAGMA_ONCE
0024 #pragma once
0025 #endif
0026
0027 namespace boost {
0028
0029 BOOST_LOG_OPEN_NAMESPACE
0030
0031 namespace attributes {
0032
0033
0034 struct basic_time_traits
0035 {
0036
0037 typedef posix_time::ptime time_type;
0038
0039
0040 #if defined(BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK)
0041 typedef posix_time::microsec_clock clock_source;
0042 #else
0043 typedef posix_time::second_clock clock_source;
0044 #endif
0045 };
0046
0047
0048 struct utc_time_traits :
0049 public basic_time_traits
0050 {
0051
0052
0053
0054 static time_type get_clock()
0055 {
0056 return clock_source::universal_time();
0057 }
0058 };
0059
0060
0061 struct local_time_traits :
0062 public basic_time_traits
0063 {
0064
0065
0066
0067 static time_type get_clock()
0068 {
0069 return clock_source::local_time();
0070 }
0071 };
0072
0073 }
0074
0075 BOOST_LOG_CLOSE_NAMESPACE
0076
0077 }
0078
0079 #include <boost/log/detail/footer.hpp>
0080
0081 #endif