java.time.Duration.parse() 方法示例 java.time.Duration.ofSeconds() 方法示例 java.time.Duration.plus方法示例 java.time.Duration.parse() 方法示例 package com.codingdict; import java.time.Duration; public class DurationDemo { public static void main(String[] args) { Duration duration = Duration.parse("PT20.345S"); System.out.println(duration.toMillis()); } } java.time.Duration.ofSeconds() 方法示例 java.time.Duration.plus方法示例