Clock.TickMillis(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 milliseconds using the best available system clock.
[Android.Runtime.Register("tickMillis", "(Ljava/time/ZoneId;)Ljava/time/Clock;", "", ApiSince=34)]
public static Java.Time.Clock? TickMillis(Java.Time.ZoneId? zone);
[<Android.Runtime.Register("tickMillis", "(Ljava/time/ZoneId;)Ljava/time/Clock;", "", ApiSince=34)>]
static member TickMillis : 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 milliseconds using the specified zone, not null
- Attributes
Remarks
Obtains a clock that returns the current instant ticking in whole milliseconds using the best available system clock. This clock will always have the nano-of-second field truncated to milliseconds. This ensures that the visible time ticks in whole milliseconds. 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 millisecond 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.ofMillis(1)).
Java reference for java.time.Clock.tickMillis.