File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -8,15 +8,16 @@ namespace sdk {
88namespace impl {
99
1010time_pt ptime_convert (const boost::posix_time::ptime& from) {
11- boost::posix_time::time_duration const time_since_epoch =
12- from - boost::posix_time::from_time_t (0 );
13- time_pt t = std::chrono::system_clock::from_time_t (time_since_epoch.total_seconds ());
14- long nsec =
15- time_since_epoch.fractional_seconds () * (1000000000 / time_since_epoch.ticks_per_second ());
11+ namespace posix_time = boost::posix_time;
12+
13+ posix_time::time_duration const time_since_epoch = from - posix_time::from_time_t (0 );
14+ const time_pt t = std::chrono::system_clock::from_time_t (time_since_epoch.total_seconds ());
15+ const long nsec = time_since_epoch.fractional_seconds () *
16+ (1000000000 / posix_time::time_duration::ticks_per_second ());
1617 return t + std::chrono::nanoseconds (nsec);
1718}
1819
19- void LogBackend::consume (const boost::log::record_view& rec) {
20+ void LogBackend::consume (const boost::log::record_view& rec) const {
2021 parent->log (*rec[attr_channel_type{}],
2122 to_string (*rec[attr_sev_type{}]),
2223 *rec[boost::log::expressions::smessage],
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ using SinkType = boost::log::sinks::synchronous_sink<LogBackend>;
1818struct LogBackend : boost::log::sinks::basic_sink_backend<boost::log::sinks::synchronized_feeding> {
1919 LogBackend (RobotClient* p) : parent(p) {}
2020
21- void consume (const boost::log::record_view&);
21+ void consume (const boost::log::record_view&) const ;
2222
2323 static boost::shared_ptr<SinkType> create (RobotClient* p);
2424
You can’t perform that action at this time.
0 commit comments