Note: As of July 10, 2024, watch faces must use the Watch Face Format in order to be installed on new watches that launch with Wear OS 5 pre-installed. Learn more about the user-facing changes in this Help Center article.

Additionally, starting in early 2025 (specific date to be announced during Q4 2024), all new watch faces published on Google Play must use the Watch Face Format.

public final class TimeInterval


A time interval, typically used to describe the validity period of a TimelineEntry.

Summary

Public constructors

Public methods

boolean
equals(Object other)
final @NonNull Instant

The Instant when this TimeInterval becomes invalid, must be after start

final @NonNull Instant

The Instant when this TimeInterval becomes valid

int
final void
final void
@NonNull String

Public constructors

TimeInterval

Added in 1.1.0
public TimeInterval(@NonNull Instant start, @NonNull Instant end)
Parameters
@NonNull Instant start

The Instant when this TimeInterval becomes valid

@NonNull Instant end

The Instant when this TimeInterval becomes invalid, must be after start

Public methods

equals

public boolean equals(Object other)

getEnd

Added in 1.1.0
public final @NonNull Instant getEnd()

The Instant when this TimeInterval becomes invalid, must be after start

getStart

Added in 1.1.0
public final @NonNull Instant getStart()

The Instant when this TimeInterval becomes valid

hashCode

public int hashCode()

setEnd

Added in 1.1.0
public final void setEnd(@NonNull Instant end)
Parameters
@NonNull Instant end

The Instant when this TimeInterval becomes invalid, must be after start

setStart

Added in 1.1.0
public final void setStart(@NonNull Instant start)
Parameters
@NonNull Instant start

The Instant when this TimeInterval becomes valid

toString

public @NonNull String toString()