From 09e651854596df0ed876d0af008049a6391bdefb Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 28 Dec 2018 06:27:35 +1100 Subject: [PATCH] Remove DurationMs and slight code refactor --- src/clock.hh | 1 - src/main.cc | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/clock.hh b/src/clock.hh index 741c049c..b4138de0 100644 --- a/src/clock.hh +++ b/src/clock.hh @@ -8,7 +8,6 @@ namespace Kakoune using Clock = std::chrono::steady_clock; using TimePoint = Clock::time_point; -using DurationMs = std::chrono::milliseconds; } diff --git a/src/main.cc b/src/main.cc index 3ede4f1c..76e33576 100644 --- a/src/main.cc +++ b/src/main.cc @@ -658,8 +658,11 @@ int run_server(StringView session, StringView server_init, UnitTest::run_all_tests(); if (debug_flags & DebugFlags::Profile) + { + using namespace std::chrono; write_to_debug_buffer(format("running the unit tests took {} ms", - std::chrono::duration_cast(Clock::now() - start_time).count())); + duration_cast(Clock::now() - start_time).count())); + } GlobalScope::instance().options().get_local_option("readonly").set(flags & ServerFlags::ReadOnly);