Package io.time

Class MicroSeconds

java.lang.Object
io.time.MicroSeconds
All Implemented Interfaces:
Time

public final class MicroSeconds extends Object implements Time
Class MicroSeconds.
  • Constructor Details

    • MicroSeconds

      public MicroSeconds()
  • Method Details

    • getTimeUnit

      public TimeUnit getTimeUnit()
      get the Time Unit.
      Specified by:
      getTimeUnit in interface Time
      Returns:
      time Unit in Microseconds.;
    • getCurrentTime

      public long getCurrentTime()
      get the current Time in Micro seconds.
      Specified by:
      getCurrentTime in interface Time
      Returns:
      current Time
    • elapsedMilliSeconds

      public double elapsedMilliSeconds(long h, long l)
      get the current Time.
      Specified by:
      elapsedMilliSeconds in interface Time
      Parameters:
      h - time stamp in Micro seconds
      l - time stamp in Micro seconds, the l should be less than h
      Returns:
      elapsed time in milliseconds
    • elapsedSeconds

      public double elapsedSeconds(long h, long l)
      get the current Time.
      Specified by:
      elapsedSeconds in interface Time
      Parameters:
      h - time stamp in Micro seconds.
      l - time stamp in Micro seconds, the l should be less than h
      Returns:
      elapsed time in seconds
    • convertToNanoSeconds

      public double convertToNanoSeconds(double t)
      convert the time to Nanoseconds.
      Specified by:
      convertToNanoSeconds in interface Time
      Parameters:
      t - time duration in microseconds.
      Returns:
      converted time in nanoseconds
    • convertToMicroSeconds

      public double convertToMicroSeconds(double t)
      convert the time to Micro seconds.
      Specified by:
      convertToMicroSeconds in interface Time
      Parameters:
      t - time duration in microseconds.
      Returns:
      converted time in microseconds
    • convertToMilliSeconds

      public double convertToMilliSeconds(double t)
      convert the time to Milliseconds.
      Specified by:
      convertToMilliSeconds in interface Time
      Parameters:
      t - time duration in microseconds.
      Returns:
      converted time in Milliseconds