2 ms·
Passing the time unit as a second parameter is used a lot in Java APIs and seems to work well
by justinhj 5y ago
Passing the time unit as a second parameter is used a lot in Java APIs and seems to work well
- qw 5y agoJava's Duration is also useful for time units void foo(Duration duration); var result = foo(Duration.ofHours(2)); You can also do simple calculations easily var bar = Duration.ofHours(2).plusMinutes(30);