31 #define getpid _getpid
42 auto now = std::chrono::system_clock::now();
43 auto duration = now.time_since_epoch();
44 auto timestamp = std::chrono::system_clock::to_time_t(now);
45 std::tm *local_time = std::localtime(×tamp);
46 auto millis = std::chrono::duration_cast<std::chrono::milliseconds>(duration).count();
47 os << std::setfill(
'0') << std::setw(2) << local_time->tm_hour <<
":"
48 << std::setw(2) << local_time->tm_min <<
":"
49 << std::setw(2) << local_time->tm_sec <<
"." << std::setw(3) << millis % 1000 <<
" - ";
54 if(getenv (
"YACSDEBUGGER"))
56 std::stringstream exec;
57 exec <<
"$YACSDEBUGGER " << getpid() <<
"&";
58 std::cerr << exec.str() << std::endl;
59 system(exec.str().c_str());
void AppendTimeClock(std::ostream &os)