mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 01:51:38 +08:00
fix
This commit is contained in:
parent
1579b24e78
commit
514526ed7a
@ -13,12 +13,11 @@ static thread_local char timestamp_cache[64];
|
||||
void c11log::formatters::format_time(const time_point& tp, std::ostream &dest)
|
||||
{
|
||||
|
||||
using namespace std::chrono;
|
||||
|
||||
// Cache timestamp string of last second
|
||||
using namespace std::chrono;
|
||||
if(duration_cast<seconds>(tp-last_tp).count() >= 1)
|
||||
{
|
||||
auto tm = details::os::localtime(std::chrono::system_clock::to_time_t(tp));
|
||||
auto tm = details::os::localtime(clock::to_time_t(tp));
|
||||
sprintf(timestamp_cache, "[%d-%02d-%02d %02d:%02d:%02d]", tm.tm_year + 1900,
|
||||
tm.tm_mon + 1,
|
||||
tm.tm_mday,
|
||||
|
Loading…
Reference in New Issue
Block a user