Class PressureObserverWrapper
Constructors
constructor
-
A pressure observer will call this callback, whenever these thresholds are met.
Parameters
Optionaloptions: anyAn object containing the thresholds used to decide what value to to return for each update property (average of start and end of a threshold boundary).
Returns PressureObserverWrapper
Properties
on Pressure Changed
An event triggered when the cpu usage/speed meets certain thresholds. Note: pressure is an experimental API.
Accessors
StaticIs Available
-
get IsAvailable(): any
Returns true if PressureObserver is available for use, false otherwise.
Returns any
Methods
dispose
-
Release the associated resources.
Returns void
observe
-
Method that must be called to begin observing changes, and triggering callbacks.
Parameters
- source: PressureSource
defines the source to observe
Returns void
- source: PressureSource
unobserve
-
Method that must be called to stop observing changes and triggering callbacks (cleanup function).
Parameters
- source: PressureSource
defines the source to unobserve
Returns void
- source: PressureSource
A wrapper for the experimental pressure api which allows a callback to be called whenever certain thresholds are met.