Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeschmitt-tr committed Aug 9, 2024
1 parent 2dee188 commit 110189a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/xs_logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,13 @@ void log(logging::Level level, const char * fmt, ...)
break;
}

using namespace std::chrono;

auto time_now = system_clock::now().time_since_epoch();
auto time_s = duration_cast<seconds>(time_now);
auto time_now = std::chrono::system_clock::now().time_since_epoch();
auto time_s = std::chrono::duration_cast<std::chrono::seconds>(time_now);
msg = msg
+ " ["
+ std::to_string(time_s.count()) // seconds
+ "."
+ std::to_string((time_now - time_s).count()) // get nanoseconds
+ std::to_string((time_now - time_s).count()) // nanoseconds
+ "] ";

va_list args;
Expand Down

0 comments on commit 110189a

Please sign in to comment.