Here you can find the source of elapsedSeconds(long startTime)
Parameter | Description |
---|---|
startTime | a parameter |
public static double elapsedSeconds(long startTime)
//package com.java2s; public class Main { /**/* ww w . j ava 2 s. c o m*/ * Get the elapsed time in seconds. * * @param startTime * @return */ public static double elapsedSeconds(long startTime) { return elapsedTime(startTime, System.nanoTime(), 1e9); } private static double elapsedTime(long startTime, long endTime, double units) { return (endTime - startTime) / units; } }