upstream changes (src)

This commit is contained in:
3lswear
2022-03-06 14:21:11 +03:00
parent 1c034c465c
commit c6e54a0c05
8 changed files with 31 additions and 34 deletions

View File

@@ -22,17 +22,14 @@ std::string getDebugTime(void)
{
time_t rawtime;
struct tm *timeinfo;
char buf[32];
time(&rawtime);
timeinfo = localtime(&rawtime);
std::string ret = std::string(asctime(timeinfo));
for (size_t i = 0; i < 3; i++)
{
ret.erase(0, ret.find(" ") + 1);
}
ret.erase(ret.find(" "));
int tmp = strftime(buf, 32, "%T", timeinfo);
buf[tmp] = '\0';
std::string ret = std::string(buf);
ret = std::string(WARNING) + "[ " + ret + " ] "
+ std::string(RESET)
+ std::string(OKCYAN);