mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 02:19:35 +08:00
delete
This commit is contained in:
@@ -10,10 +10,10 @@ void c11log::formatters::format_time(const c11log::formatters::timepoint& tp, st
|
||||
int millis = static_cast<int>(std::chrono::duration_cast<std::chrono::milliseconds>(duration).count() % 1000);
|
||||
//std::put_time(&tm, "[ %Y-%m-%d %H:%M:%S ]") - seems too slow
|
||||
char buf[64];
|
||||
sprintf(buf, "[%d-%02d-%02d %02d:%02d:%02d.%03d]",
|
||||
auto size = sprintf(buf, "[%d-%02d-%02d %02d:%02d:%02d.%03d]",
|
||||
tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
|
||||
tm.tm_hour, tm.tm_min, tm.tm_sec, millis);
|
||||
dest << buf;
|
||||
dest.write(buf, size);
|
||||
}
|
||||
|
||||
void c11log::formatters::format_time(std::ostream& dest)
|
||||
@@ -33,4 +33,4 @@ std::string c11log::formatters::to_hex(const unsigned char* buf, std::size_t siz
|
||||
oss << _hex_chars[buf[i] & 0x0F];
|
||||
}
|
||||
return oss.str();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user