Class MyWatches

java.lang.Object
com.molecular_java.MyWatches

public class MyWatches extends Object
A class for time meassurement. It has methods for start and stop of the time period.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    double
    Elapsed time in millis (count in the end()) method.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    end()
    The method notes the current time as the end time and sets the elapsed time as a difference of end and start time.
    void
    On start, the method notes the current time for further counting.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • timeElapsed

      public double timeElapsed
      Elapsed time in millis (count in the end()) method.
  • Constructor Details

    • MyWatches

      public MyWatches()
  • Method Details

    • start

      public void start()
      On start, the method notes the current time for further counting.
    • end

      public void end()
      The method notes the current time as the end time and sets the elapsed time as a difference of end and start time.