public static long timeToInternal ( TimeUnit unit , Double time ) { return Math . round ( time * unit . getValue ( ) / TimeUnit . nanosecond . getValue ( ) ) ; }
Utility method to convert a value in the given unit to the internal time