umontreal.iro.lecuyer.util
Class Chrono
- java.lang.Object
-
- umontreal.iro.lecuyer.util.AbstractChrono
-
- umontreal.iro.lecuyer.util.Chrono
-
public class Chrono extends AbstractChrono
TheChronoclass extends theAbstractChronoclass and computes the CPU time for the current thread only. This is the simplest way to use chronos. Classes AbstractChrono,SystemTimeChrono,GlobalCPUTimeChronoandThreadCPUTimeChronoprovide different chronos implementations. See these classes to learn more about SSJ chronos, if problems appear with class Chrono.
-
-
Constructor Summary
Constructors Constructor and Description Chrono()Constructs a Chrono object and initializes it to zero.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static ChronocreateForSingleThread()Creates a Chrono instance adapted for a program using a single thread.-
Methods inherited from class umontreal.iro.lecuyer.util.AbstractChrono
format, format, getHours, getMinutes, getSeconds, init
-
-
-
-
Method Detail
-
createForSingleThread
public static Chrono createForSingleThread()
Creates a Chrono instance adapted for a program using a single thread. Under Java 1.5, this method returns an instance ofChronoSingleThreadwhich can measure CPU time for one thread. Under Java versions prior to 1.5, this returns an instance of this class. This method must not be used to create a timer for a multi-threaded program, because the obtained CPU times will differ depending on the used Java version.- Returns:
- the constructed timer.
-
-
DMelt 3.0 © DataMelt by jWork.ORG