Commit 514526ed authored by gabime's avatar gabime

fix

parent 1579b24e
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment