Here you can find the source of checkTimeUnit(TimeUnit timeUnit)
static void checkTimeUnit(TimeUnit timeUnit)
//package com.java2s; //License from project: Apache License import java.util.concurrent.TimeUnit; public class Main { static void checkTimeUnit(TimeUnit timeUnit) { if (timeUnit == TimeUnit.NANOSECONDS || timeUnit == TimeUnit.MICROSECONDS) { throw new IllegalArgumentException("Milliseconds is the lowest permitted time unit!"); }/*from w ww . j av a2s. c om*/ } }