Here you can find the source of getDurationString(double duration)
public static String getDurationString(double duration)
//package com.java2s; //License from project: Open Source License import java.text.DecimalFormat; public class Main { private static DecimalFormat df = new DecimalFormat("##.##"); public static String getDurationString(double duration) { return df.format(duration) + "s"; }//from w w w . j av a2s . c o m }