There was an error while loading. Please reload this page.
OSGL tool provides expressive way to access few commonly used system functions.
// old way long ts = System.currentTimeMillis(); // new way long ts = $.ms(); // old way long ns = System.nanoTime(); // new way long ns = $.ns(); long ns = $.ts(); // old way String versionStr = System.getProperty("java.specification.version"); int pos = versionStr.lastIndexOf('.'); int version = Integer.parseInt(versionStr.substring(pos + 1)); // new way int version = $.JAVA_VERSION