摘要: 最近在做一个小的下载器,在计算下载内容所消耗时间时,需要把得到的毫秒数转成时间格式例如66000毫秒 就是00:01:06 这样子,在网上找了很长时间也没有找到,索性自己写一个工具类package com.lis.util;public class StringUtil { /** * 毫秒转日期字符串 65秒转换成 00:01:05 * * @param str * @return */ public static String secondsToStr(long time) { String result = ""; int seconds = new Double(t 阅读全文
posted @ 2013-02-05 09:17 Code_Log 阅读(3412) 评论(0) 推荐(0)