# TimelineBuilders.TimeInterval

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/wear/protolayout/TimelineBuilders.TimeInterval "View this page in Java")

<br />

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

<br />

*** ** * ** ***

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

## Summary

|                                                                                                                                         ### Nested types                                                                                                                                          |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `class `[TimelineBuilders.TimeInterval.Builder](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TimelineBuilders.TimeInterval.Builder) Builder for[TimeInterval](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TimelineBuilders.TimeInterval) |

|                               ### Public functions                                |
|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)     | [getEndMillis](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TimelineBuilders.TimeInterval#getEndMillis())`()` Gets end point of the time interval, in milliseconds since the Unix epoch.          |
| [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)     | [getStartMillis](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TimelineBuilders.TimeInterval#getStartMillis())`()` Gets starting point of the time interval, in milliseconds since the Unix epoch. |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | [toString](https://developer.android.com/reference/kotlin/androidx/wear/protolayout/TimelineBuilders.TimeInterval#toString())`()`                                                                                             |

## Public functions

### getEndMillis

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

```
fun getEndMillis(): Long
```

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)  

```
fun getStartMillis(): Long
```

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

### toString

```
fun toString(): String
```