3 ms·
Thread.sleep (the java example) is ancient, but java is at least consistent and uses millis for everything. Almost all other timing functions in java have a 2-a
by rzwitserloot 5y ago
Thread.sleep (the java example) is ancient, but java is at least consistent and uses millis for everything. Almost all other timing functions in java have a 2-arg setup: `.foo(5, TimeUnit.HOURS)`. Where TimeUnit is an enum that has the usual options (HOURS, MILLIS, SECONDS, etc). It doesn't go beyond 'days' (once you get to months in particular, is that 28 days, 30 days, 31 days, 30.437 days (which is the actual average)....).