StopwatchLap
@Document(name = "builtin:StopwatchLap")
public class StopwatchLap extends Thing
| java.lang.Object | ||
| ↳ | androidx.appsearch.builtintypes.Thing | |
| ↳ | androidx.appsearch.builtintypes.StopwatchLap |
An AppSearch document representing a StopwatchLap entity.
A Stopwatch can create a Lap, which will take a snapshot of the duration from when the previous Lap was created to when the new Lap is created. For example: if a Stopwatch starts at 12:00, creates a Lap at 12:05, and creates another Lap at 12:15, then it would have created two Laps with 5 minutes duration and 10 minutes duration respectively.
Summary
Nested types |
|---|
@Document.BuilderProducerBuilder for |
Public methods |
|
|---|---|
long |
Returns the total duration in milliseconds accumulated by all the |
long |
Returns the total duration in milliseconds accumulated by the current |
int |
Returns the position of the current |
Inherited methods |
||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public methods
getAccumulatedLapDurationMillis
public long getAccumulatedLapDurationMillis()
Returns the total duration in milliseconds accumulated by all the StopwatchLap instances up to and including this one.
getLapDurationMillis
public long getLapDurationMillis()
Returns the total duration in milliseconds accumulated by the current StopwatchLap.
getLapNumber
public int getLapNumber()
Returns the position of the current StopwatchLap, starting at 1.