From 12024aeda97b2d24113d05d44e86636cc15a0bf4 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sun, 12 Sep 2021 08:51:44 -0700 Subject: [PATCH] LibJS: Use ElapsedTimer::start_new(); --- Userland/Libraries/LibJS/Heap/Heap.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Userland/Libraries/LibJS/Heap/Heap.cpp b/Userland/Libraries/LibJS/Heap/Heap.cpp index 4e7ccdf6fb..48df49c432 100644 --- a/Userland/Libraries/LibJS/Heap/Heap.cpp +++ b/Userland/Libraries/LibJS/Heap/Heap.cpp @@ -90,8 +90,7 @@ void Heap::collect_garbage(CollectionType collection_type, bool print_report) perf_event(PERF_EVENT_SIGNPOST, gc_perf_string_id, global_gc_counter++); #endif - Core::ElapsedTimer collection_measurement_timer; - collection_measurement_timer.start(); + auto collection_measurement_timer = Core::ElapsedTimer::start_new(); if (collection_type == CollectionType::CollectGarbage) { if (m_gc_deferrals) { m_should_gc_when_deferral_ends = true;