Whenever some activity starts on the thread we are monitoring, we create a timer that targets the BHMgr Monitor thread (where we capture hang stacks). Whenever the activity stops, we cancel the timer. In the past, this would have been very expensive because the Timer thread used to wake-up every time a timer was added or removed. This is no longer true, as we optimized the wake-up behavior of the timer thread to only wake-up when it actually needs to. Differential Revision: https://phabricator.services.mozilla.com/D154141