From 10649401766368271c0597a1adcc1a7f559b9683 Mon Sep 17 00:00:00 2001 From: Sagar Dhawan Date: Mon, 21 Mar 2022 21:11:18 -0700 Subject: [PATCH] Fix dispatch warnings for one-shot system timers (#16505) * Fix dispatch warnings for one-shot system timers * Restyled by clang-format Co-authored-by: Restyled.io --- src/system/SystemLayerImplSelect.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/system/SystemLayerImplSelect.cpp b/src/system/SystemLayerImplSelect.cpp index 74357f9d195b57..84d7023e1e094a 100644 --- a/src/system/SystemLayerImplSelect.cpp +++ b/src/system/SystemLayerImplSelect.cpp @@ -139,8 +139,8 @@ CHIP_ERROR LayerImplSelect::StartTimer(Clock::Timeout delay, TimerCompleteCallba timer->mTimerSource = timerSource; dispatch_source_set_timer( - timerSource, dispatch_walltime(NULL, static_cast(Clock::Milliseconds64(delay).count() * NSEC_PER_MSEC)), 0, - 2 * NSEC_PER_MSEC); + timerSource, dispatch_walltime(NULL, static_cast(Clock::Milliseconds64(delay).count() * NSEC_PER_MSEC)), + DISPATCH_TIME_FOREVER, 2 * NSEC_PER_MSEC); dispatch_source_set_event_handler(timerSource, ^{ dispatch_source_cancel(timerSource); dispatch_release(timerSource);