Class PressureObserverWrapper
Hierarchy
- PressureObserverWrapper
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
A pressure observer will call this callback, whenever these thresholds are met.
Parameters
Optional options: PressureObserverOptions
An 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 ChangedSearch playground for onPressureChanged
An event triggered when the cpu usage/speed meets certain thresholds. Note: pressure is an experimental API.
Accessors
Static Is Available
Returns true if PressureObserver is available for use, false otherwise.
Returns boolean
Methods
disposeSearch playground for dispose
Release the associated resources.
Returns void
observeSearch playground for observe
Method that must be called to begin observing changes, and triggering callbacks.
Parameters
source: "cpu"
defines the source to observe
Returns void
unobserveSearch playground for unobserve
Method that must be called to stop observing changes and triggering callbacks (cleanup function).
Parameters
source: "cpu"
defines the source to unobserve
Returns void
A wrapper for the experimental pressure api which allows a callback to be called whenever certain thresholds are met.