mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-10 10:18:38 +09:00
1311425 - Make requestIdleCallback aware of timeouts.
Prepare for handling several sources of idleness. Make idle callbacks aware of nsITimers. Add pref for how far into the timer queue. 1311425 - Avoid expiration timers when scheduling idle runnables. review comment fix to ensure low priority timers aren't taken into account when calling NS_GetTimerDeadlineHintOnCurrentThread.
This commit is contained in:
parent
464b839bbd
commit
5499c5f9a3
12 changed files with 188 additions and 60 deletions
|
|
@ -16,10 +16,18 @@ class MainThreadIdlePeriod final : public IdlePeriod
|
|||
public:
|
||||
NS_DECL_NSIIDLEPERIOD
|
||||
|
||||
MainThreadIdlePeriod()
|
||||
: mLastIdleDeadline(TimeStamp::Now())
|
||||
{
|
||||
}
|
||||
|
||||
static float GetLongIdlePeriod();
|
||||
static float GetMinIdlePeriod();
|
||||
static uint32_t GetMaxTimerThreadBound();
|
||||
private:
|
||||
virtual ~MainThreadIdlePeriod() {}
|
||||
|
||||
TimeStamp mLastIdleDeadline;
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue