# Interface NanoClock (2.1.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.1.0 (latest)](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.NanoClock)
- [2.0.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/2.0.3/com.google.api.client.util.NanoClock)
- [1.47.1](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.47.1/com.google.api.client.util.NanoClock)
- [1.46.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.46.3/com.google.api.client.util.NanoClock)
- [1.45.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.45.3/com.google.api.client.util.NanoClock)
- [1.44.2](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.44.2/com.google.api.client.util.NanoClock)
- [1.43.2](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.43.2/com.google.api.client.util.NanoClock)
- [1.42.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.42.3/com.google.api.client.util.NanoClock)
- [1.41.8](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.41.8/com.google.api.client.util.NanoClock)

    public interface NanoClock

Nano clock which can be used to measure elapsed time in nanoseconds.

The default system implementation can be accessed at [#SYSTEM](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.NanoClock#com_google_api_client_util_NanoClock_SYSTEM). Alternative
implementations may be used for testing.

## Static Fields

### SYSTEM

    public static final NanoClock SYSTEM

Provides the default System implementation of a nano clock by using System#nanoTime().

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.NanoClock` |   |

## Methods

### nanoTime()

    public abstract long nanoTime()

Returns the current value of the most precise available system timer, in nanoseconds for use to
measure elapsed time, to match the behavior of System#nanoTime().

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |