Android的java.util.concurrent.TimeUnit中转换毫秒到分钟 [英] Android java.util.concurrent.TimeUnit Convert Milliseconds to Minutes

查看:915
本文介绍了Android的java.util.concurrent.TimeUnit中转换毫秒到分钟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法来转换毫秒使用java.util.concurrent.TimeUnit中的分?

Is there a way to convert milliseconds to minutes using java.util.concurrent.TimeUnit?

<一个href="http://stackoverflow.com/questions/625433/how-to-convert-milliseconds-to-x-mins-x-seconds-in-java/625624#625624">This回答似乎表明,你可以使用 TimeUnit.MILLISECONDS.toMinutes()法,该文档建议您可以使用 TimeUnit.MILLISECONDS.convert()方法 TimeUnit.MINUTES - 问题是,无论是 TimeUnit.MINUTES TimeUnit.MILLISECONDS.toMinutes()似乎确实存在。

This answer seems to suggest that you can use a TimeUnit.MILLISECONDS.toMinutes() method, and the documentation suggests that you could use the TimeUnit.MILLISECONDS.convert() method with TimeUnit.MINUTES - the problem is that neither TimeUnit.MINUTES or TimeUnit.MILLISECONDS.toMinutes() seem to actually exist.

我失去了一些东西呢?

推荐答案

我相信的TimeUnit可能在1.6加分:的 1.6文档,的 1.5文档

I believe TimeUnit might have added minutes in 1.6: 1.6 docs, 1.5 docs

这篇关于Android的java.util.concurrent.TimeUnit中转换毫秒到分钟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆