public class TimeSource extends Object
| Constructor and Description |
|---|
TimeSource() |
| Modifier and Type | Method and Description |
|---|---|
static long |
getTimeNS()
Gets the current time of this thread in nanoseconds from the most accurate timer available on
the system.
|
public static long getTimeNS()
The intended use case of this method is to measure the time a certain action takes by making successive calls to it. It should not be used to measure total times in the sense of a time stamp.