Clock.TickSeconds(ZoneId) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Obtains a clock that returns the current instant ticking in whole seconds using the best available system clock.
[Android.Runtime.Register("tickSeconds", "(Ljava/time/ZoneId;)Ljava/time/Clock;", "", ApiSince=26)]
public static Java.Time.Clock? TickSeconds(Java.Time.ZoneId? zone);
[<Android.Runtime.Register("tickSeconds", "(Ljava/time/ZoneId;)Ljava/time/Clock;", "", ApiSince=26)>]
static member TickSeconds : Java.Time.ZoneId -> Java.Time.Clock
Parameters
- zone
- ZoneId
the time-zone to use to convert the instant to date-time, not null
Returns
a clock that ticks in whole seconds using the specified zone, not null
- Attributes
Remarks
Obtains a clock that returns the current instant ticking in whole seconds using the best available system clock. This clock will always have the nano-of-second field set to zero. This ensures that the visible time ticks in whole seconds. The underlying clock is the best available system clock, equivalent to using system(ZoneId). Implementations may use a caching strategy for performance reasons. As such, it is possible that the start of the second observed via this clock will be later than that observed directly via the underlying clock. The returned implementation is immutable, thread-safe and Serializable. It is equivalent to tick(system(zone), Duration.ofSeconds(1)).
Java reference for java.time.Clock.tickSeconds.