Last active
October 16, 2019 10:51
-
-
Save jonjack/310e513788a95e53dd37d723fdf8b68f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.joda.time.LocalTime; | |
public class Timer { | |
public static void main(String[] args) { | |
LocalTime start = LocalTime.now(); | |
// some event to be timed | |
LocalTime end = LocalTime.now(); | |
int delta = end.getMillisOfDay() - start.getMillisOfDay(); | |
System.out.println("Time took: " + Double.valueOf(delta)/1000 + " seconds"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment