# beep()

Syntax:

    [void] sysinfo.beep(Int frequency, Int duration)

Description:

The `beep` method produces a beep tone in a specified frequency for a specified duration.

Argument:

- `frequency`:

  Defines the frequency of the tone measured in Hz (Hertz).

Note: The maximum and minimum values for frequency are naturally device-specific. If the specified frequency is out of the device's supported range, the maximum frequency is applied.

- `duration`:

  Defines the duration of how long the beep tone lasts. The period is measured in milliseconds.

  If the duration is `0`, the beep tone will last infinitely.

Return value:

This method does not return a value.

Remarks:

To stop an infinitive beep, call the beep method again with any value that is different from `0`.

Example code:

    function beepAlert()
    {
       // call the beep function with frequency 220Hz
       // for the duration 2 seconds
       sysinfo.beep(220, 2000);
    }