public final class SystemInfo extends Object
| Modifier and Type | Method and Description |
|---|---|
static long |
currentTimeMicros()
Returns the number of microseconds since the epoch (00:00:00, 01-Jan-1970, GMT).
|
static String |
hostname()
Returns the local hostname.
|
static boolean |
isLinux()
Returns
true if the operating system is Linux. |
static int |
javaVersion()
Returns the major version of the current Java Virtual Machine.
|
static boolean |
jettyAlpnOptionalOrAvailable()
Whether the environment either supports ALPN natively or includes Jetty ALPN.
|
static OsType |
osType()
Returns the operating system for the currently running process.
|
static int |
pid()
Returns the current process ID.
|
public static int javaVersion()
public static String hostname()
public static boolean jettyAlpnOptionalOrAvailable()
public static int pid()
IllegalStateException - if failed to retrieve the current process ID.public static long currentTimeMicros()
System.currentTimeMillis() * 1000 is returned on
Java 8.public static OsType osType()
public static boolean isLinux()
true if the operating system is Linux.Copyright © 2020 LeanCloud. All rights reserved.