IdleDeadline Class

The deadline of an idle callback (https://w3c.github.io/requestidlecallback/#the-idledeadline-interface): the time remaining in the idle period that runs the callback.

public sealed class IdleDeadline

Properties

NameDescription
DidTimeoutGets whether the callback runs because its timeout elapsed (https://w3c.github.io/requestidlecallback/#dom-idledeadline-didtimeout).

DidTimeout

IdleDeadline.cs

Gets whether the callback runs because its timeout elapsed (https://w3c.github.io/requestidlecallback/#dom-idledeadline-didtimeout).

public bool DidTimeout { get; }

Methods

NameDescription
TimeRemaining()Returns the time remaining in the idle period, in milliseconds (https://w3c.github.io/requestidlecallback/#dom-idledeadline-timeremaining): 0 when the idle period ended, or when the callback runs because its timeout elapsed. The deadline is computed again at each call: a timer or an animation frame requested by the callback ends the idle period sooner.

TimeRemaining()

IdleDeadline.cs

Returns the time remaining in the idle period, in milliseconds (https://w3c.github.io/requestidlecallback/#dom-idledeadline-timeremaining): 0 when the idle period ended, or when the callback runs because its timeout elapsed. The deadline is computed again at each call: a timer or an animation frame requested by the callback ends the idle period sooner.

public double TimeRemaining()