Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.
public abstract class Clock
- Object
- Clock
Constructors
public Clock() |
Methods
Inherited methods
Constructor details
Clock
public Clock()Method details
getZone
public abstract ZoneId getZone()instant
public abstract Instant instant()withZone
public abstract Clock withZone(ZoneId zone)This clock, reporting its instants in
zone.millis
public long millis()systemUTC
public static Clock systemUTC()systemDefaultZone
public static Clock systemDefaultZone()system
public static Clock system(ZoneId zone)The system clock, seen in
zone.fixed
public static Clock fixed(Instant fixedInstant, ZoneId zone)offset
public static Clock offset(Clock base, Duration offsetDuration)A clock that reads
base moved on by offsetDuration.