Here you can find the source of secondsPassed(int startTime)
public static int secondsPassed(int startTime)
//package com.java2s; //License from project: Apache License import java.util.concurrent.TimeUnit; public class Main { public static int secondsPassed(int startTime) { return getSecondsTimeStamp() - startTime; }/*from w ww . jav a2 s . co m*/ public static int getSecondsTimeStamp() { return (int) TimeUnit.NANOSECONDS.toSeconds(System.nanoTime()); } }