Why aren't Java.util.concurrent.TimeUnit types greater than SECONDS available in Android?

时光总嘲笑我的痴心妄想 提交于 2019-12-19 05:50:46

问题


I miss MINUTES, HOURS, DAYS, which exist in documentaion since API level 1 (I use 7th or 2.1 version for the application).

I have read this question, where this miss was also pointed out (though, it wasn't in the question itself), but as solution making own calculations was only proposed.

I am not lazy, but I send some data to server (Java project), where TimeUnit.MINUTES or TimeUnit.HOURS are actively used. Just want to avoid mistakes.

Will be grateful for any help.


回答1:


If you open the javadoc for TimeUnit on java 5 and java 6 side by side you will see that these were added in java 6. Android so far only implements java 5.



来源:https://stackoverflow.com/questions/5497324/why-arent-java-util-concurrent-timeunit-types-greater-than-seconds-available-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!