SyntaxFix
Write A Post
Hire A Developer
Questions
Now you can try something like:
Instant starts = Instant.now(); Thread.sleep(10); Instant ends = Instant.now(); System.out.println(Duration.between(starts, ends));
Output is in ISO 8601.