java.time.Duration.plusNanos() 方法示例 java.time.Duration.plusMinutes() 方法示例 java.time.Duration.plusSeconds() 方法示例 java.time.Duration.plusNanos() 方法示例 package com.codingdict; import java.time.Duration; public class DurationDemo { public static void main(String[] args) { Duration duration = Duration.ofSeconds(2); Duration duration1 = duration.plusNanos(1000); System.out.println(duration1.toNanos()); } } java.time.Duration.plusMinutes() 方法示例 java.time.Duration.plusSeconds() 方法示例