Remove DurationMs and slight code refactor

This commit is contained in:
Maxime Coste 2018-12-28 06:27:35 +11:00
parent ef8fdd664f
commit 09e6518545
2 changed files with 4 additions and 2 deletions

View File

@ -8,7 +8,6 @@ namespace Kakoune
using Clock = std::chrono::steady_clock;
using TimePoint = Clock::time_point;
using DurationMs = std::chrono::milliseconds;
}

View File

@ -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<DurationMs>(Clock::now() - start_time).count()));
duration_cast<milliseconds>(Clock::now() - start_time).count()));
}
GlobalScope::instance().options().get_local_option("readonly").set<bool>(flags & ServerFlags::ReadOnly);