Clock tickMinutes(ZoneId zone) example
Description
Clock tickMinutes(ZoneId zone)
returns a clock
for the current instant ticking in whole minutes.
Syntax
tickMinutes
has the following syntax.
public static Clock tickMinutes(ZoneId zone)
Example
The following example shows how to use tickMinutes
.
import java.time.Clock;
import java.time.ZoneId;
//from ww w . j ava 2s . c o m
public class Main {
public static void main(String[] args) {
Clock clock = Clock.tickMinutes(ZoneId.systemDefault());
System.out.println(clock);
System.out.println(clock.instant());
}
}
The code above generates the following result.