public class SystemUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static long |
getCpuTimeNanos()
Returns the total time spent using a CPU for the current thread in nanoseconds.
|
static long |
getSystemTimeNanos()
Returns system time (the time spent running OS kernel code on behalf of your
application) in nanoseconds, by calculating the difference between CPU time and user
time for the current thread.
|
static long |
getUserTimeNanos()
Returns the CPU time that the current thread has executed in user mode in nanoseconds
(i.e., the time spent running current thread's own code).
|
static long |
getWallClockTimeMillis()
Returns the current time in milliseconds.
|
static long |
getWallClockTimeNanos()
Returns the current value of the current Java Virtual Machine's high-resolution time
source in nanoseconds.
|
public static long getWallClockTimeMillis()
public static long getWallClockTimeNanos()
public static long getCpuTimeNanos()
public static long getUserTimeNanos()
public static long getSystemTimeNanos()
Copyright © 2020. All rights reserved.