# Status.TimerPart

# Status.TimerPart

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

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/androidx/wear/ongoing/Status.TimerPart "View this page in Java")


```
class Status.TimerPart : Status.TimerOrStopwatchPart
```

<br />

|---|---|---|---------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)                                                       ||||
| ↳ | [androidx.wear.ongoing.Status.Part](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.Part)                 |||
|   | ↳ | [androidx.wear.ongoing.Status.TimerOrStopwatchPart](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.TimerOrStopwatchPart) ||
|   |   | ↳ | [androidx.wear.ongoing.Status.TimerPart](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.TimerPart) |

*** ** * ** ***

An Ongoing activity status (or part of it) representing a timer.

Available since wear-ongoing:1.0.0

## Summary

|                                                                                                                                                                                                                                ### Public constructors                                                                                                                                                                                                                                |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [TimerPart](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.TimerPart#TimerPart(long))`(timeZeroMillis: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Create a Part representing a timer.                                                                                                                                                                                                                             |
| [TimerPart](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.TimerPart#TimerPart(long,long))`(timeZeroMillis: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`, pausedAtMillis: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Create a Part representing a timer.                                                                                                                       |
| [TimerPart](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.TimerPart#TimerPart(long,long,long))`(` ` timeZeroMillis: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`,` ` pausedAtMillis: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`,` ` totalDurationMillis: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) `)` Create a Part representing a timer. |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From [androidx.wear.ongoing.Status.TimerOrStopwatchPart](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.TimerOrStopwatchPart) |------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)            | [equals](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.TimerOrStopwatchPart#equals(java.lang.Object))`(obj: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)`                                                                                                                                                                                                                                                                  | | [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                  | [getNextChangeTimeMillis](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.TimerOrStopwatchPart#getNextChangeTimeMillis(long))`(fromTimeMillis: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` See [getNextChangeTimeMillis](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/TimeDependentText#getNextChangeTimeMillis(long))                                                                            | | [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                  | [getPausedAtMillis](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.TimerOrStopwatchPart#getPausedAtMillis())`()`                                                                                                                                                                                                                                                                                                                                               | | [CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html) | [getText](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.TimerOrStopwatchPart#getText(android.content.Context,long))`(context: `[Context](https://developer.android.com/reference/android/content/Context.html)`, timeNowMillis: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` See [getText](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/TimeDependentText#getText(android.content.Context,long)) | | [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                  | [getTimeZeroMillis](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.TimerOrStopwatchPart#getTimeZeroMillis())`()`                                                                                                                                                                                                                                                                                                                                               | | [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                  | [getTotalDurationMillis](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.TimerOrStopwatchPart#getTotalDurationMillis())`()`                                                                                                                                                                                                                                                                                                                                     | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)            | [hasTotalDuration](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.TimerOrStopwatchPart#hasTotalDuration())`()` Determines if this has a total duration set.                                                                                                                                                                                                                                                                                                    | | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                    | [hashCode](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.TimerOrStopwatchPart#hashCode())`()`                                                                                                                                                                                                                                                                                                                                                                 | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)            | [isCountDown](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.TimerOrStopwatchPart#isCountDown())`()`                                                                                                                                                                                                                                                                                                                                                           | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)            | [isPaused](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.TimerOrStopwatchPart#isPaused())`()` Determines if this Timer or Stopwatch is paused. i.e. the display representation will not change over time.                                                                                                                                                                                                                                                     | |

## Public constructors

### TimerPart

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

```
TimerPart(timeZeroMillis: Long)
```

Create a Part representing a timer.  

|                                           Parameters                                            |
|-------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|
| `timeZeroMillis: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | timestamp of the time at the future in which this Timer should display 0. |

### TimerPart

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

```
TimerPart(timeZeroMillis: Long, pausedAtMillis: Long)
```

Create a Part representing a timer.  

|                                           Parameters                                            |
|-------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|
| `timeZeroMillis: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | timestamp of the time at the future in which this Timer should display 0.            |
| `pausedAtMillis: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | timestamp of the time when this timer was paused. Or `-1L` if this timer is running. |

### TimerPart

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

```
TimerPart(
    timeZeroMillis: Long,
    pausedAtMillis: Long,
    totalDurationMillis: Long
)
```

Create a Part representing a timer.  

|                                              Parameters                                              |
|------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|
| `timeZeroMillis: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)      | timestamp of the time at the future in which this Timer should display 0.            |
| `pausedAtMillis: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)      | timestamp of the time when this timer was paused. Or `-1L` if this timer is running. |
| `totalDurationMillis: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | total duration of this timer, useful to display as a progress bar or similar.        |