TimeUnit.SECONDS.toMillis

I did not understand the explanation in oracle, what does this piece of code actually do?

final int maximumDelay = (int) TimeUnit.SECONDS.toMillis(1000);
+5
source share
1 answer

It converts 1000 seconds to milliseconds, then truncates the result from longto int.

+22
source

All Articles