Squashed 'libs/loguru/' content from commit eb2a694

git-subtree-dir: libs/loguru
git-subtree-split: eb2a69416e178c9e4a4232afd6606fb4b2bb046e
This commit is contained in:
Christina Sander
2022-10-20 13:55:09 +02:00
commit 6f159b1a16
30 changed files with 5776 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";
}