fix: misc

This commit is contained in:
3lswear
2022-03-06 13:44:14 +03:00
parent 814d32f7ce
commit 1c034c465c
2 changed files with 10 additions and 5 deletions

View File

@@ -22,14 +22,17 @@ std::string getDebugTime(void)
{
time_t rawtime;
struct tm *timeinfo;
char buf[32];
time(&rawtime);
timeinfo = localtime(&rawtime);
int tmp = strftime(buf, 32, "%T", timeinfo);
buf[tmp] = '\0';
std::string ret = std::string(buf);
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(" "));
ret = std::string(WARNING) + "[ " + ret + " ] "
+ std::string(RESET)
+ std::string(OKCYAN);