Java TimeUnit.toMinutes(long duration)
Syntax
TimeUnit.toMinutes(long duration) has the following syntax.
public long toMinutes(long duration)
Example
In the following code shows how to use TimeUnit.toMinutes(long duration) method.
/*from w ww.j a va 2 s . c o m*/
import java.util.concurrent.TimeUnit;
public class Main {
public static void main(String[] args) {
TimeUnit tu = TimeUnit.DAYS;
System.out.println(tu.toDays(1));
System.out.println(tu.toHours(1));
System.out.println(tu.toMinutes(1));
}
}