Proper logging instead of blindly printing to standard out
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
// Created by loki on 6/6/19.
|
||||
//
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <thread>
|
||||
|
||||
extern "C" {
|
||||
@@ -225,7 +223,7 @@ void capture_display(packet_queue_t packets, idr_event_t idr_events, config_t co
|
||||
|
||||
auto t = std::chrono::steady_clock::now();
|
||||
if(t > next_snapshot) {
|
||||
std::cout << "Taking snapshot took "sv << std::chrono::floor<std::chrono::milliseconds>(t - next_snapshot).count() << " milliseconds too long"sv << std::endl;
|
||||
BOOST_LOG(warning) << "Taking snapshot took "sv << std::chrono::floor<std::chrono::milliseconds>(t - next_snapshot).count() << " milliseconds too long"sv;
|
||||
}
|
||||
|
||||
std::this_thread::sleep_until(next_snapshot);
|
||||
|
||||
Reference in New Issue
Block a user