@ Pure public static double toSeconds ( double value , TimeUnit inputUnit ) { switch ( inputUnit ) { case DAYS : return value * 86400. ; case HOURS : return value * 3600. ; case MINUTES : return value * 60. ; case SECONDS : break ; case MILLISECONDS : return milli2unit ( value ) ; case MICROSECONDS : return micro2unit ( value ) ; case NANOSECONDS : return nano2unit ( value ) ; default : throw new IllegalArgumentException ( ) ; } return value ; }
Convert the given value expressed in the given unit to seconds .