Class DiaUtil


  • public class DiaUtil
    extends java.lang.Object
    Class Diautil offers methods that make it easy to calculate
    execution time by means of a timer;
    further it offers a method that shows the name of the user
    and can be called right before program termination in order
    to indicate the user's name and the program's running time.
    • Constructor Summary

      Constructors 
      Constructor Description
      DiaUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void clear()
      This method tries to clear the screen (erase the terminal) both in Windows and in Unix platforms.
      static void showFinalTime()
      This method shows the time of invocation and the user name; it is normally called right before the program will finish.
      static void startTimer()
      This method stores its time of invocation in variable starting time (ms)
      static void stopTimerAndPrintElapsedTimeMillis()
      This method stores its time of invocation in variable stopping time (ms) and then prints the elapsed time since the last call to startTimer()
      • Methods inherited from class java.lang.Object

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

      • DiaUtil

        public DiaUtil()
    • Method Detail

      • startTimer

        public static void startTimer()
        This method stores its time of invocation in variable starting time (ms)
      • stopTimerAndPrintElapsedTimeMillis

        public static void stopTimerAndPrintElapsedTimeMillis()
        This method stores its time of invocation in variable stopping time (ms) and then prints the elapsed time since the last call to startTimer()
      • showFinalTime

        public static void showFinalTime()
        This method shows the time of invocation and the user name; it is normally called right before the program will finish.
      • clear

        public static void clear()
        This method tries to clear the screen (erase the terminal) both in Windows and in Unix platforms.