Here you can find the source of getSecond()
public static double getSecond()
//package com.java2s; //License from project: Open Source License import java.text.DecimalFormat; public class Main { private static long timer = 0; private static DecimalFormat formatter = new DecimalFormat("#.##"); public static double getSecond() { return format((double) getMili() / 1000.0); }//from w ww . j av a 2 s . co m private static Double format(double val) { return Double.parseDouble(formatter.format(val)); } public static long getMili() { return timer / 1000000; } }