# Status.StopwatchPart

# Status.StopwatchPart

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.StopwatchPart)  
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.StopwatchPart "View this page in Java")

<br />

```
class Status.StopwatchPart : 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.StopwatchPart](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.StopwatchPart) |

*** ** * ** ***

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

Available since wear-ongoing:1.0.0

## Summary

|                                                                                                                                                                                                                                        ### Public constructors                                                                                                                                                                                                                                        |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [StopwatchPart](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.StopwatchPart#StopwatchPart(long))`(timeZeroMillis: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Create a Part representing a stopwatch.                                                                                                                                                                                                                             |
| [StopwatchPart](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.StopwatchPart#StopwatchPart(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 stopwatch.                                                                                                                       |
| [StopwatchPart](https://developer.android.com/reference/kotlin/androidx/wear/ongoing/Status.StopwatchPart#StopwatchPart(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 stopwatch. |

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

### StopwatchPart

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

```
StopwatchPart(timeZeroMillis: Long)
```

Create a Part representing a stopwatch.  

|                                           Parameters                                            |
|-------------------------------------------------------------------------------------------------|----------------------------------------------------------------|
| `timeZeroMillis: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | timestamp of the time at which this stopwatch started running. |

### StopwatchPart

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

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

Create a Part representing a stopwatch.  

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

### StopwatchPart

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

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

Create a Part representing a stopwatch.  

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