package umontreal.iro.lecuyer.util;
import java.lang.management.ManagementFactory;
import java.lang.management.ThreadMXBean;
@Deprecated
/**
* This class is deprecated but kept for
* compatibility with older versions of SSJ.
* {@link Chrono} should be used instead of {@link ChronoSingleThread}.
* The {@link ChronoSingleThread} class extends the {@link AbstractChrono}
* class and computes the CPU time for the current thread only.
* This is the simplest way to use chronos. Classes {@link AbstractChrono},
* {@link SystemTimeChrono}, {@link GlobalCPUTimeChrono} and
* {@link ThreadCPUTimeChrono} provide different chronos implementations
* (see these classes to learn more about SSJ chronos).
*
*/
public class ChronoSingleThread extends AbstractChrono {
private ThreadCPUTimeChrono chrono = new ThreadCPUTimeChrono();
protected void getTime (long[] tab) {
chrono.getTime(tab);
}
/**
* Constructs a ChronoSingleThread object and
* initializes it to zero.
*
*/
public ChronoSingleThread() {
chrono.init();
init();
}
}
Ads help maintain this website.