Here you can find the source of durationInSeconds(long startNano)
public static float durationInSeconds(long startNano)
//package com.java2s; //License from project: Apache License public class Main { /**//w w w. j a v a2 s. c om * Returns the duration in second between the specified nano time and now. */ public static float durationInSeconds(long startNano) { final long endNano = System.nanoTime(); final long durationMillis = (endNano - startNano) / 1000000; final float duration = durationMillis / 1000f; return duration; } }