> For the complete documentation index, see [llms.txt](https://sheita.gitbook.io/sysmonitoring/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sheita.gitbook.io/sysmonitoring/functions/getping.md).

# getPing()

## `getPing()`

### Overview

The `getPing()` function retrieves the current network latency (ping) by using the `inetLatency()` method from the `systeminformation` library. It returns the latency in milliseconds (ms).

### Usage

```js
const ping = await monitoring.getPing();
```

### Description

* **`getPing()`** fetch the network latency (ping).
* The result is returned in milliseconds (ms), representing the round-trip time for network communication.
* This function is asynchronous, so it returns a promise and should be used with `await`.

Use this function to monitor network latency in real-time or log the ping status for your application.
