Android examples for java.util:Date Time
format time Duration in long value
//package com.java2s; public class Main { public static String formatDuration(long duration) { long seconds = duration / 1000; long minutes = seconds / 60; seconds = seconds % 60;//from w ww .jav a2s . co m return minutes + "m " + seconds + "s"; } }