Java Decimal Format getDurationString(double duration)

Here you can find the source of getDurationString(double duration)

Description

get Duration String

License

Open Source License

Declaration

public static String getDurationString(double duration) 

Method Source Code


//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
}

Related

  1. getDoubleDecimalNumber(double d)
  2. getDoubledigit(double f)
  3. getDoubleForDisplay(Double d)
  4. getDoubleFromTaxSet(String taxSetValue)
  5. getDoubleWithTwoDecimalDigits(double value)
  6. getEngineeringNotation(final double d)
  7. getInteger(Double d)
  8. getIntNum(Double value)
  9. getProgressExact(double balance, double cost)