From c39edfab2d105c7f49e16aba1c9def2ddbcfe747 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Sat, 12 Jul 2025 11:16:04 +0200 Subject: [PATCH] Tests: Fix calculation of elapsed time in tests We were already taking the "elapsed" part of the global timer, by subtracting the known runtime from that we always ended up with 0 milliseconds. --- Libraries/LibTest/TestSuite.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibTest/TestSuite.cpp b/Libraries/LibTest/TestSuite.cpp index c04d8331478..b462ea0a1b0 100644 --- a/Libraries/LibTest/TestSuite.cpp +++ b/Libraries/LibTest/TestSuite.cpp @@ -255,7 +255,7 @@ int TestSuite::run(Vector> const& tests) } auto const runtime = m_test_time + m_bench_time; - auto const elapsed = global_timer.elapsed() - runtime; + auto const elapsed = global_timer.elapsed(); dbgln("Finished {} tests and {} benchmarks in {}ms ({}ms tests, {}ms benchmarks, {}ms other).", test_count,