public class SystemUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static Logger |
DEFAULT_LOGGER
Default system logger
|
Constructor and Description |
---|
SystemUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
exitAfter(long millisecs)
Exits after a given time.
|
static java.lang.String |
getClassSimpleName(java.lang.String class_name)
Gets the simple name of a class.
|
static Logger |
getDefaultLogger()
Gets the default system logger.
|
static void |
setDefaultLogger(Logger default_logger)
Sets the default system logger.
|
static void |
sleep(long millisecs)
Causes the current thread to sleep for the specified number of milliseconds.
|
protected static Logger DEFAULT_LOGGER
public static void sleep(long millisecs)
Thread.sleep(long)
, it never throws an InterruptedException
.millisecs
- the length of time to sleep in millisecondspublic static void exitAfter(long millisecs)
Note that this method is not blocking.
millisecs
- the length of time before exiting, in millisecondspublic static java.lang.String getClassSimpleName(java.lang.String class_name)
Class
introduced in Java 1.5.
It is provided for backward compatibility with Java 1.4 and JavaME.
class_name
- the class namepublic static void setDefaultLogger(Logger default_logger)
default_logger
- the default loggerpublic static Logger getDefaultLogger()