SSJ
V. 1.2.5.

umontreal.iro.lecuyer.util
Class ChronoSingleThread

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

public class ChronoSingleThread
extends Chrono

The ChronoSingleThread class extends the Chrono class and computes the CPU time for the current thread only. It is valid only under Java-1.5 since Java-1.5 provides platform-independent facilities to get the CPU time for a single thread through management API. The parent class Chrono uses a platform-dependent method (since it is programmed directly in C) to determine the CPU time for all threads. Here is an example of how it may be used:


    Chrono timer = new ChronoSingleThread();
double t = timer.getSeconds();
    timer.init();
    t = timer.getSeconds();
t = timer.getMinutes();
    System.out.println (timer.format());


Constructor Summary
ChronoSingleThread()
          Constructs a ChronoSingleThread object and initializes it to zero.
 
Method Summary
 
Methods inherited from class umontreal.iro.lecuyer.util.Chrono
createForSingleThread, format, format, getHours, getMinutes, getSeconds, init
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChronoSingleThread

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


SSJ
V. 1.2.5.

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