# TimelineBuilders.TimeInterval

Artifact: [androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/TimelineBuilders.java+class:androidx.wear.protolayout.TimelineBuilders.TimeInterval) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***


```
@RequiresSchemaVersion(major = 1, minor = 0)
public final class TimelineBuilders.TimeInterval
```

<br />

*** ** * ** ***

A time interval, typically used to describe the validity period of a `https://developer.android.com/reference/androidx/wear/protolayout/TimelineBuilders.TimelineEntry`.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/TimelineBuilders.TimeInterval.Builder` Builder for `https://developer.android.com/reference/androidx/wear/protolayout/TimelineBuilders.TimeInterval` |

| ### Public methods |
|---|---|
| `long` | `https://developer.android.com/reference/androidx/wear/protolayout/TimelineBuilders.TimeInterval#getEndMillis()()` Gets end point of the time interval, in milliseconds since the Unix epoch. |
| `long` | `https://developer.android.com/reference/androidx/wear/protolayout/TimelineBuilders.TimeInterval#getStartMillis()()` Gets starting point of the time interval, in milliseconds since the Unix epoch. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/wear/protolayout/TimelineBuilders.TimeInterval#toString()()` |

## Public methods

### getEndMillis

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public long getEndMillis()
```

Gets end point of the time interval, in milliseconds since the Unix epoch.

### getStartMillis

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public long getStartMillis()
```

Gets starting point of the time interval, in milliseconds since the Unix epoch.

### toString

```
public @NonNull String toString()
```