Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 928
87element Avatar asked Mar 31 '11 08:03

87element


1 Answers

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.

like image 66
Jörn Horstmann Avatar answered Oct 19 '22 01:10

Jörn Horstmann