Options
All
  • Public
  • Public/Protected
  • All
Menu

A wrapper for the experimental pressure api which allows a callback to be called whenever certain thresholds are met.

Hierarchy

  • PressureObserverWrapper

Index

Constructors

  • 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

onPressureChanged: Observable<PressureRecord[]>

An event triggered when the cpu usage/speed meets certain thresholds. Note: pressure is an experimental API.

Accessors

  • get IsAvailable(): boolean
  • Returns true if PressureObserver is available for use, false otherwise.

    Returns boolean

Methods

  • dispose(): void
  • Release the associated resources.

    Returns void

  • observe(source: "cpu"): void
  • Method that must be called to begin observing changes, and triggering callbacks.

    Parameters

    • source: "cpu"

      defines the source to observe

    Returns void

  • unobserve(source: "cpu"): void
  • Method that must be called to stop observing changes and triggering callbacks (cleanup function).

    Parameters

    • source: "cpu"

      defines the source to unobserve

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static method

Settings

Theme