TimeUnit: toHours(long duration) : TimeUnit « java.util.concurrent « Java by API





TimeUnit: toHours(long duration)

  
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: DAYS
2.TimeUnit.MILLISECONDS
3.TimeUnit.SECONDS
4.TimeUnit: sleep(long timeout)
5.TimeUnit: toDays(long duration)
6.TimeUnit: toMinutes(long duration)