TimeUnit: DAYS : TimeUnit « java.util.concurrent « Java by API






TimeUnit: DAYS

  
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));

  }
}

   
    
  








Related examples in the same category

1.TimeUnit.MILLISECONDS
2.TimeUnit.SECONDS
3.TimeUnit: sleep(long timeout)
4.TimeUnit: toDays(long duration)
5.TimeUnit: toHours(long duration)
6.TimeUnit: toMinutes(long duration)