# Interface Clock (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.Clock)
- [2.0.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/2.0.3/com.google.api.client.util.Clock)
- [1.47.1](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.47.1/com.google.api.client.util.Clock)
- [1.46.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.46.3/com.google.api.client.util.Clock)
- [1.45.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.45.3/com.google.api.client.util.Clock)
- [1.44.2](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.44.2/com.google.api.client.util.Clock)
- [1.43.2](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.43.2/com.google.api.client.util.Clock)
- [1.42.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.42.3/com.google.api.client.util.Clock)
- [1.41.8](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.41.8/com.google.api.client.util.Clock)

    public interface Clock

Clock which can be used to get the amount of elapsed milliseconds in system time.

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.Clock#com_google_api_client_util_Clock_SYSTEM). Alternative
implementations may be used for testing.

## Static Fields

### SYSTEM

    public static final Clock SYSTEM

Provides the default System implementation of a Clock by using System#currentTimeMillis().

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

## Methods

### currentTimeMillis()

    public abstract long currentTimeMillis()

Returns the current time in milliseconds since midnight, January 1, 1970 UTC, to match the
behavior of System#currentTimeMillis().

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