SSJ
V. 2.6.2.

umontreal.iro.lecuyer.util
Class Chrono

java.lang.Object
  extended by umontreal.iro.lecuyer.util.AbstractChrono
      extended by umontreal.iro.lecuyer.util.Chrono

public class Chrono
extends AbstractChrono

The Chrono class extends the AbstractChrono class and computes the CPU time for the current thread only. This is the simplest way to use chronos. Classes AbstractChrono, SystemTimeChrono, GlobalCPUTimeChrono and ThreadCPUTimeChrono provide different chronos implementations. See these classes to learn more about SSJ chronos, if problems appear with class Chrono.


Constructor Summary
Chrono()
          Constructs a Chrono object and initializes it to zero.
 
Method Summary
static Chrono createForSingleThread()
          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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Chrono

public Chrono()
Constructs a Chrono object and initializes it to zero.

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 of ChronoSingleThread which 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.

SSJ
V. 2.6.2.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.