Question
How to use the Instant Class in Java to get Elapsed Time in Seconds to a Certain Number of Decimal Points?
Is there any way to use the Instant
class in Java to get elapsed time in seconds to a certain number of decimal points? I took some time to experiment, and I was able to to use the .now()
method at two separate points in the program, and subtract them to get the elapsed time. However, my problem was I couldn't get the seconds to a specific number of decimal points.