java.time.Clock.tick() 方法示例 java.time.Clock.systemUTC() 方法示例 java.time.Clock.tickMinutes() 方法示例 java.time.Clock.tick() 方法示例 package com.codingdict; import java.time.Clock; import java.time.Duration; public class ClockDemo { public static void main(String[] args) { Clock clock = Clock.systemUTC(); Duration tickDuration = Duration.ofNanos(250000); Clock clock1 = Clock.tick(clock, tickDuration); System.out.println("Clock : " + clock.instant()); System.out.println("Clock1 : " + clock1.instant()); } } java.time.Clock.systemUTC() 方法示例 java.time.Clock.tickMinutes() 方法示例