long start = System.currentTimeMillis();
long end = start + 60*1000; // 60 seconds * 1000 ms/sec
while (System.currentTimeMillis() < end)
{
// run
}
More Related Contents:
- Sort Arraylist With Times [duplicate]
- Java string to date conversion
- Calculating the difference between two Java date instances
- How to convert Milliseconds to “X mins, x seconds” in Java?
- What is this date format? 2011-08-12T20:17:46.384Z
- How to calculate “time ago” in Java?
- Convert timestamp in milliseconds to string formatted time in Java
- Time comparison
- Should I use Java date and time classes or go with a 3rd party library like Joda Time?
- JFormattedTextField : input time duration value
- Creating java date object from year,month,day
- Best way to constrain user to enter a time in a JTextField
- System.currentTimeMillis() vs. new Date() vs. Calendar.getInstance().getTime()
- Java: getMinutes and getHours
- Java Date cut off time information
- Calculate Difference between two times in Android
- How to properly format the date?
- How do you have the code pause for a couple of seconds in android?
- How to convert HH:mm:ss.SSS to milliseconds?
- Parsing time strings like “1h 30min”
- I want to get current time in Java but without the Internet and without the system time
- java.lang.System.currentTimeMillis() replace method
- Getting the current time millis from device and converting it into a new date with different timezone [duplicate]
- How do I get difference between two dates in android?, tried every thing and post
- DateTimeParse Exception
- GPS Time Representation library
- Getting Date in HTTP format in Java
- Get the number of days, weeks, and months, since Epoch in Java
- How can I measure time with microsecond precision in Java?
- print current date in java