Duration ofMinutes(long minutes)
creates a Duration
representing a number of standard minutes.
ofMinutes
has the following syntax.
public static Duration ofMinutes(long minutes)
The following example shows how to use ofMinutes
.
import java.time.Duration; public class Main { public static void main(String[] args) { Duration duration = Duration.ofMinutes(10); System.out.println(duration); } }
The code above generates the following result.