You’ll find one in
http://commons.apache.org/lang/
It’s called
org.apache.commons.lang.time.StopWatch
But it roughly does the same as yours. If you’re in for more precision, use
System.nanoTime()
See also this question here:
More Related Contents:
- How to get milliseconds from LocalDateTime in Java 8
- How to convert a string Date to long millseconds
- Java – alternative to thread.sleep
- How to convert JOptionPane String Input into an Int? [duplicate]
- Why an instance of class MqttClient must be enclosed by try/catch?
- Why my program crash when i press back Button
- Java Class that implements Map and keeps insertion order?
- Synchronizing on String objects in Java
- Difference between thread’s context class loader and normal classloader
- Eclipse java debugging: source not found
- Can I have a textfield inside a label?
- How can I share a variable or object between two or more Servlets?
- Java volatile array?
- Start CMD by using ProcessBuilder
- Why does Java not see the updated value from another thread?
- Use Java and RegEx to convert casing in a string
- How to list all AWS S3 objects in a bucket using Java
- What are bytecodes and how does the JVM handle them
- Difference between String trim() and strip() methods in Java 11
- How do you know a variable type in java? [duplicate]
- Running a method when closing the program?
- Compiling and running with JavaFX 2.1
- android: changing option menu items programmatically
- Understanding the difference between null and ‘\u000’ in Java
- java.util.logging.Logger doesn’t respect java.util.logging.Level?
- How to find a Java thread running on Linux with ps -axl?
- “Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or @CollectionOfElements” in hibernate when annotating a ConcurrentHashMap
- Issue with Java Regex \b
- How to add rectangles on top of existing rectangle in canvas
- nested type cannot hide an enclosing type