Package net.targetr.wtm3
Class Clock
java.lang.Object
net.targetr.wtm3.Clock
Abstraction for the system clock.
- Author:
- Dr Michael Gardiner
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Clock
public Clock()
-
-
Method Details
-
realtime
public static long realtime()Returns the current time in milliseconds since some arbitrary time in the past. This method is useful for measuring elapsed time.- Returns:
- A value in milliseconds for measuring time differences..
-
sleep
public static void sleep(int millis) Pauses the current thread for the specified number of milliseconds.- Parameters:
millis
- The number of milliseconds to sleep.- Throws:
RuntimeException
- If the thread is interrupted while sleeping.
-