How to convert a value from nanoseconds to seconds?
Here\'s the code segment:
import java.io.*; import java.util.concurrent.*; .. class Stamper
To reduce verbosity, you can use a static import:
import static java.util.concurrent.TimeUnit.NANOSECONDS;
-and henceforth just type
NANOSECONDS.toSeconds(elapsedTime);