Skip to content

Instantly share code, notes, and snippets.

@CalebWhiting
Created June 20, 2016 20:00
Show Gist options
  • Select an option

  • Save CalebWhiting/df3552caec495c5527d34e822a8b4162 to your computer and use it in GitHub Desktop.

Select an option

Save CalebWhiting/df3552caec495c5527d34e822a8b4162 to your computer and use it in GitHub Desktop.
package org.jscrape.internal;
public class Main {
public static void main(String[] args) {
NativeScreen.getMouseX();
long start = System.currentTimeMillis();
for (int i = 0; i < 1_000_000; i++) {
NativeScreen.getScreenWidth();
}
long elapsed = System.currentTimeMillis() - start;
System.out.println("Completed in " + elapsed + " millis");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment