Here you can find the source of calculateSeconds(long duration)
private static int calculateSeconds(long duration)
//package com.java2s; //License from project: Open Source License public class Main { private static int calculateSeconds(long duration) { //not perfect but don't care return (int) duration / 1000; }/* www .ja va 2s .c o m*/ }