This is the code for TimeUnit.MILLISECONDS.toSecond(long d):
public long toSeconds(long d) { return d/(C3/C2); }
where C2, C3are the static constants. You can save one unit ... In this case, I prefer your actual code, it is easier to understand
source
share