Merge commit '8e97373d883c06e1c73791849561d1311c880bc0' as 'libs/loguru'

This commit is contained in:
Henry Winkel
2022-09-15 09:52:21 +02:00
30 changed files with 5801 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#include <chrono>
#include <thread>
#include <glog/logging.h>
inline void sleep_ms(int ms)
{
VLOG(2) << "Sleeping for " << ms << " ms";
std::this_thread::sleep_for(std::chrono::milliseconds(ms));
}
inline void complex_calculation()
{
LOG(INFO) << "complex_calculation started";
LOG(INFO) << "Starting time machine...";
sleep_ms(200);
LOG(WARNING) << "The flux capacitor is not getting enough power!";
sleep_ms(400);
LOG(INFO) << "Lighting strike!";
VLOG(1) << "Found 1.21 gigawatts...";
sleep_ms(400);
std::thread([](){
LOG(ERROR) << "We ended up in 1985!";
}).join();
LOG(INFO) << "complex_calculation stopped";
}