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

*** ** * ** ***


```
public final class Status.StopwatchPart extends Status.TimerOrStopwatchPart
```

<br />

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||
| ↳ | [androidx.wear.ongoing.Status.Part](https://developer.android.com/reference/androidx/wear/ongoing/Status.Part) |||
|   | ↳ | [androidx.wear.ongoing.Status.TimerOrStopwatchPart](https://developer.android.com/reference/androidx/wear/ongoing/Status.TimerOrStopwatchPart) ||
|   |   | ↳ | [androidx.wear.ongoing.Status.StopwatchPart](https://developer.android.com/reference/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 |
|---|
| `https://developer.android.com/reference/androidx/wear/ongoing/Status.StopwatchPart#StopwatchPart(long)(long timeZeroMillis)` Create a Part representing a stopwatch. |
| `https://developer.android.com/reference/androidx/wear/ongoing/Status.StopwatchPart#StopwatchPart(long,long)(long timeZeroMillis, long pausedAtMillis)` Create a Part representing a stopwatch. |
| `https://developer.android.com/reference/androidx/wear/ongoing/Status.StopwatchPart#StopwatchPart(long,long,long)( long timeZeroMillis, long pausedAtMillis, long totalDurationMillis )` Create a Part representing a stopwatch. |

| ### Inherited methods |
|---|
| From [androidx.wear.ongoing.Status.TimerOrStopwatchPart](https://developer.android.com/reference/androidx/wear/ongoing/Status.TimerOrStopwatchPart) |---|---| | `boolean` | `https://developer.android.com/reference/androidx/wear/ongoing/Status.TimerOrStopwatchPart#equals(java.lang.Object)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Object.html obj)` | | `long` | `https://developer.android.com/reference/androidx/wear/ongoing/Status.TimerOrStopwatchPart#getNextChangeTimeMillis(long)(long fromTimeMillis)` See `https://developer.android.com/reference/androidx/wear/ongoing/TimeDependentText#getNextChangeTimeMillis(long)` | | `long` | `https://developer.android.com/reference/androidx/wear/ongoing/Status.TimerOrStopwatchPart#getPausedAtMillis()()` | | `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/CharSequence.html` | `https://developer.android.com/reference/androidx/wear/ongoing/Status.TimerOrStopwatchPart#getText(android.content.Context,long)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context, long timeNowMillis)` See `https://developer.android.com/reference/androidx/wear/ongoing/TimeDependentText#getText(android.content.Context,long)` | | `long` | `https://developer.android.com/reference/androidx/wear/ongoing/Status.TimerOrStopwatchPart#getTimeZeroMillis()()` | | `long` | `https://developer.android.com/reference/androidx/wear/ongoing/Status.TimerOrStopwatchPart#getTotalDurationMillis()()` | | `boolean` | `https://developer.android.com/reference/androidx/wear/ongoing/Status.TimerOrStopwatchPart#hasTotalDuration()()` Determines if this has a total duration set. | | `int` | `https://developer.android.com/reference/androidx/wear/ongoing/Status.TimerOrStopwatchPart#hashCode()()` | | `boolean` | `https://developer.android.com/reference/androidx/wear/ongoing/Status.TimerOrStopwatchPart#isCountDown()()` | | `boolean` | `https://developer.android.com/reference/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)

```
public StopwatchPart(long timeZeroMillis)
```

Create a Part representing a stopwatch.

| Parameters |
|---|---|
| `long timeZeroMillis` | 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)

```
public StopwatchPart(long timeZeroMillis, long pausedAtMillis)
```

Create a Part representing a stopwatch.

| Parameters |
|---|---|
| `long timeZeroMillis` | timestamp of the time at which this stopwatch started running. |
| `long pausedAtMillis` | 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)

```
public StopwatchPart(
    long timeZeroMillis,
    long pausedAtMillis,
    long totalDurationMillis
)
```

Create a Part representing a stopwatch.

| Parameters |
|---|---|
| `long timeZeroMillis` | timestamp of the time at which this stopwatch started running. |
| `long pausedAtMillis` | timestamp of the time when this stopwatch was paused. Or `-1L` if this stopwatch is running. |
| `long totalDurationMillis` | total duration of this stopwatch, useful to display as a progress bar or similar. |