Here you can find the source of printTime(long starttime, long endtime)
public static void printTime(long starttime, long endtime)
//package com.java2s; //License from project: Apache License public class Main { /** Prints the TIME difference */ public static void printTime(long starttime, long endtime) { long totaltime = (endtime - starttime) / 1000; System.out.print("\nTime Taken: [Hours: " + totaltime / 60 / 60 + ", Minutes: " + totaltime / 60 % 60 + ", Seconds: " + totaltime % 60 % 60 + "]"); }// ww w .j a v a2s . co m }