LibJS: Use ElapsedTimer::start_new();

This commit is contained in:
Brian Gianforcaro 2021-09-12 08:51:44 -07:00 committed by Brian Gianforcaro
commit 12024aeda9
Notes: sideshowbarker 2024-07-18 04:06:52 +09:00

View file

@ -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++); perf_event(PERF_EVENT_SIGNPOST, gc_perf_string_id, global_gc_counter++);
#endif #endif
Core::ElapsedTimer collection_measurement_timer; auto collection_measurement_timer = Core::ElapsedTimer::start_new();
collection_measurement_timer.start();
if (collection_type == CollectionType::CollectGarbage) { if (collection_type == CollectionType::CollectGarbage) {
if (m_gc_deferrals) { if (m_gc_deferrals) {
m_should_gc_when_deferral_ends = true; m_should_gc_when_deferral_ends = true;