Skip to content

Commit

Permalink
update comment (#24566)
Browse files Browse the repository at this point in the history
* update comment

* Update src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
  • Loading branch information
2 people authored and pull[bot] committed Oct 12, 2023
1 parent 64de2e6 commit 1171359
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1896,6 +1896,10 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::_RequestSEDActiv

if (!onOff && delayIdle && CHIP_DEVICE_CONFIG_SED_ACTIVE_THRESHOLD.count() != 0)
{
// StartTimer will cancel a timer if the same callback & context is used.
// This will have the effect of canceling the previous one (if any) and starting
// a new timer of the same duration. This effectively prolongs the active threshold
// without consuming additional resources.
err = DeviceLayer::SystemLayer().StartTimer(CHIP_DEVICE_CONFIG_SED_ACTIVE_THRESHOLD, RequestSEDModeUpdate, this);
if (CHIP_NO_ERROR == err)
{
Expand Down
8 changes: 2 additions & 6 deletions src/system/SystemLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,8 @@ class DLL_EXPORT Layer
* This method cancels a one-shot timer, started earlier through @p StartTimer().
*
* @note
* The cancellation could fail silently in two different ways. If the timer specified by the combination of the callback
* function and application state object couldn't be found, cancellation could fail. If the timer has fired, then
* an event is queued and will be processed later.
*
* WARNING: Timer handlers MUST assume that they may be hit even after CancelTimer due to cancelling an
* already fired timer that is queued in the event loop already.
* The cancellation could fail silently if the timer specified by the combination of the callback
* function and application state object couldn't be found.
*
* @param[in] aOnComplete A pointer to the callback function used in calling @p StartTimer().
* @param[in] aAppState A pointer to the application state object used in calling @p StartTimer().
Expand Down

0 comments on commit 1171359

Please sign in to comment.