If target TimeUnit is known at compile time, we can use TimeUnit.toSomething method instead of TimeUnit.convert.
E.g.
TimeUnit.MILLISECONDS.convert(adjust, TimeUnit.NANOSECONDS);
Could be replaced with
TimeUnit.NANOSECONDS.toMillis(adjust);
It's shorter and a bit faster.
E.g.
TimeUnit.MILLISECONDS.convert(adjust, TimeUnit.NANOSECONDS);
Could be replaced with
TimeUnit.NANOSECONDS.toMillis(adjust);
It's shorter and a bit faster.