Class Times


  • public class Times
    extends java.lang.Object
    This class allows Java to access the information obtained by the UNIX system call times.
    • Constructor Summary

      Constructors 
      Constructor Description
      Times()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)
      Test program.
      static boolean snapshot()
      Takes a "snapshot" of the system.
      static float systemTime()
      Returns the system time used by this process in seconds.
      static float userTime()
      Returns the user time used by this process in seconds.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Times

        public Times()
    • Method Detail

      • snapshot

        public static boolean snapshot()
        Takes a "snapshot" of the system. Reads various items from the result of times.
        Returns:
        true if everything is successful
      • userTime

        public static float userTime()
        Returns the user time used by this process in seconds.
      • systemTime

        public static float systemTime()
        Returns the system time used by this process in seconds.
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Test program.
        Throws:
        java.lang.Exception