Documentation of 'umontreal.iro.lecuyer.util.ThreadCPUTimeChrono' Java class
ThreadCPUTimeChrono
umontreal.iro.lecuyer.util

Class ThreadCPUTimeChrono



  • public class ThreadCPUTimeChrono
    extends AbstractChrono
    Extends the AbstractChrono class to compute the CPU time for a single thread. It is available only under Java 1.5 which provides platform-independent facilities to get the CPU time for a single thread through management API.

    Note that this chrono might not work properly on some systems running Linux because of a bug in Sun's implementation or Linux kernel. For instance, this class unexpectedly computes the global CPU time under Fedora Core 4, kernel 2.6.17 and JRE version 1.5.0-09. With Fedora Core 6, kernel 2.6.20, the function is working properly. As a result, one should not rely on this bug to get the global CPU time.

    Note that the above bug does not prevent one from using this chrono to compute the CPU time for a single-threaded application. In that case, the global CPU time corresponds to the CPU time of the current thread.

    Running timer fonctions when the associated thread is dead will return 0.

    • Constructor Summary

      Constructors 
      Constructor and Description
      ThreadCPUTimeChrono()
      Constructs a ThreadCPUTimeChrono object associated with current thread and initializes it to zero.
      ThreadCPUTimeChrono(java.lang.Thread inThread)
      Constructs a ThreadCPUTimeChrono object associated with the given Thread variable and initializes it to zero.
    • Constructor Detail

      • ThreadCPUTimeChrono

        public ThreadCPUTimeChrono()
        Constructs a ThreadCPUTimeChrono object associated with current thread and initializes it to zero.
      • ThreadCPUTimeChrono

        public ThreadCPUTimeChrono(java.lang.Thread inThread)
        Constructs a ThreadCPUTimeChrono object associated with the given Thread variable and initializes it to zero.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.