Here you can find the source of secondsToInternal(int seconds)
public static int secondsToInternal(int seconds)
//package com.java2s; public class Main { /**//from www . jav a 2 s . c o m * Constants we use to check whether conversion to "quarters" can be * done using just ints */ private final static int MAX_SECONDS_FOR_INT = Integer.MAX_VALUE / 1000; /** * Helper method that converts from seconds into internal time unit * (which is approximately "quarter of a second") */ public static int secondsToInternal(int seconds) { // fastest way is without converting to long, can be used for most cases: if (seconds < MAX_SECONDS_FOR_INT) { return (seconds * 1000) >>> 8; } // if not, use long long msecs = 1000L * seconds; return (int) (msecs >>> 8); } }