You can also say Duration.fromMilliseconds(ms) to avoid bringing in a new import. No big though.