Here you can find the source of toMillisInfo(long ms)
public static long[] toMillisInfo(long ms)
//package com.java2s; //License from project: Apache License public class Main { public static long[] toMillisInfo(long ms) { long hour, minute, second; hour = ms / 1000 / 60 / 60;//from w ww. java 2 s .c om minute = (ms - hour * 60 * 60 * 1000) / 1000 / 60; second = ms / 1000 - hour * 60 * 60 - minute * 60; return new long[] { hour, minute, second }; } }