Add TID debug printing

This commit is contained in:
Lion Kortlepel
2020-11-03 09:36:00 +01:00
parent 289bb1c1f3
commit 69f20bdf41
2 changed files with 9 additions and 0 deletions

View File

@@ -8,6 +8,13 @@
#include <sstream>
#include <chrono>
#include <mutex>
#include <thread>
void DebugPrintTIDInternal(const std::string& what, const std::string& func) {
std::stringstream ss;
ss << "Thread '" << std::this_thread::get_id() << "' in " << func << " is " << what;
debug(ss.str());
}
std::string getDate() {
typedef std::chrono::duration<int, std::ratio_multiply<std::chrono::hours::period, std::ratio<24>>::type> days;