Package io.time
Class MicroSeconds
java.lang.Object
io.time.MicroSeconds
- All Implemented Interfaces:
Time
Class MicroSeconds.
-
Field Summary
Fields inherited from interface io.time.Time
MICROS_PER_MS, MICROS_PER_SEC, MS_PER_MIN, MS_PER_SEC, NS_PER_MICRO, NS_PER_MS, NS_PER_SEC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleconvertToMicroSeconds(double t) convert the time to Micro seconds.doubleconvertToMilliSeconds(double t) convert the time to Milliseconds.doubleconvertToNanoSeconds(double t) convert the time to Nanoseconds.doubleelapsedMilliSeconds(long h, long l) get the current Time.doubleelapsedSeconds(long h, long l) get the current Time.longget the current Time in Micro seconds.get the Time Unit.
-
Constructor Details
-
MicroSeconds
public MicroSeconds()
-
-
Method Details
-
getTimeUnit
get the Time Unit.- Specified by:
getTimeUnitin interfaceTime- Returns:
- time Unit in Microseconds.;
-
getCurrentTime
public long getCurrentTime()get the current Time in Micro seconds.- Specified by:
getCurrentTimein interfaceTime- Returns:
- current Time
-
elapsedMilliSeconds
public double elapsedMilliSeconds(long h, long l) get the current Time.- Specified by:
elapsedMilliSecondsin interfaceTime- Parameters:
h- time stamp in Micro secondsl- 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:
elapsedSecondsin interfaceTime- 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:
convertToNanoSecondsin interfaceTime- 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:
convertToMicroSecondsin interfaceTime- Parameters:
t- time duration in microseconds.- Returns:
- converted time in microseconds
-
convertToMilliSeconds
public double convertToMilliSeconds(double t) convert the time to Milliseconds.- Specified by:
convertToMilliSecondsin interfaceTime- Parameters:
t- time duration in microseconds.- Returns:
- converted time in Milliseconds
-