umontreal.iro.lecuyer.util
Class Chrono
java.lang.Object
umontreal.iro.lecuyer.util.AbstractChrono
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. |
Chrono
public Chrono()
- Constructs a Chrono object and
initializes it to zero.
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.
To submit a bug or ask questions, send an e-mail to
Pierre L'Ecuyer.