List of usage examples for java.lang System currentTimeMillis
@HotSpotIntrinsicCandidate public static native long currentTimeMillis();
From source file:edu.umn.cs.spatialHadoop.operations.Aggregate.java
/** * @param args//from ww w . j a v a 2 s . com * @throws IOException */ public static void main(String[] args) throws IOException { OperationsParams params = new OperationsParams(new GenericOptionsParser(args)); if (!params.checkInput()) { printUsage(); System.exit(1); } long t1 = System.currentTimeMillis(); MinMax minmax = aggregate(params.getPaths(), params); long t2 = System.currentTimeMillis(); System.out.println("Total processing time: " + (t2 - t1) + " millis"); System.out.println("MinMax of readings is " + minmax); }
From source file:org.apache.asterix.experiment.client.LSMExperimentSetRunner.java
public static void main(String[] args) throws Exception { java.util.logging.Logger.getLogger("org.apache.http.headers").setLevel(Level.FINEST); // LogManager.getRootLogger().setLevel(org.apache.log4j.Level.OFF); LSMExperimentSetRunnerConfig config = new LSMExperimentSetRunnerConfig( String.valueOf(System.currentTimeMillis()), 3); CmdLineParser clp = new CmdLineParser(config); try {/*from w w w . java 2s .c om*/ clp.parseArgument(args); } catch (CmdLineException e) { System.err.println(e.getMessage()); clp.printUsage(System.err); System.exit(1); } final String pkg = "org.apache.asterix.experiment.builder.suite"; Reflections reflections = //new Reflections("org.apache.asterix.experiment.builder.suite"); new Reflections(new ConfigurationBuilder().setUrls(ClasspathHelper.forPackage(pkg)) .filterInputsBy(new FilterBuilder().includePackage(pkg)) .setScanners(new TypeElementsScanner().publicOnly(), new MethodParameterScanner())); Map<String, AbstractLSMBaseExperimentBuilder> nameMap = new TreeMap<>(); for (Constructor c : reflections.getConstructorsMatchParams(LSMExperimentSetRunnerConfig.class)) { AbstractLSMBaseExperimentBuilder b = (AbstractLSMBaseExperimentBuilder) c.newInstance(config); nameMap.put(b.getName(), b); } Pattern p = config.getRegex() == null ? null : Pattern.compile(config.getRegex()); SequentialActionList exps = new SequentialActionList(); for (Map.Entry<String, AbstractLSMBaseExperimentBuilder> e : nameMap.entrySet()) { if (p == null || p.matcher(e.getKey()).matches()) { exps.add(e.getValue().build()); if (LOGGER.isLoggable(Level.INFO)) { LOGGER.info("Added " + e.getKey() + " to run list..."); } } } exps.perform(); }
From source file:Main.java
public static Long getNewId() { return System.currentTimeMillis(); }
From source file:Main.java
public static long nowSecond() { return System.currentTimeMillis() / 1000L; }
From source file:Main.java
public static Long getLongTime() { return System.currentTimeMillis(); }
From source file:Main.java
public static Long getTimeStamp() { return System.currentTimeMillis() / 1000; }
From source file:Main.java
public static long getTimeUTCMS() { return System.currentTimeMillis(); }
From source file:Main.java
public static long timeInSecond() { return (System.currentTimeMillis() / 1000); }
From source file:Main.java
public static long currentSecond() { return System.currentTimeMillis() / 1000; }
From source file:Main.java
public static Long getCurrentDate() { return System.currentTimeMillis(); }