public class Chrono extends AbstractChrono
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 and Description |
|---|
Chrono()
Constructs a Chrono object and
initializes it to zero.
|
| Modifier and Type | Method and Description |
|---|---|
static Chrono |
createForSingleThread()
Creates a Chrono instance adapted for a program
using a single thread.
|
format, format, getHours, getMinutes, getSeconds, initpublic static Chrono createForSingleThread()
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.To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.