Package net.snowflake.client.util
Class TimeMeasurement
- java.lang.Object
-
- net.snowflake.client.util.TimeMeasurement
-
@SnowflakeJdbcInternalApi public class TimeMeasurement extends Object
Class keeping the start and stop time in epoch microseconds.
-
-
Constructor Summary
Constructors Constructor Description TimeMeasurement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getEnd()
Get the stop time as epoch time in microseconds.long
getStart()
Get the start time as epoch time in microseconds.long
getTime()
Get the microseconds between the stop and start time.void
setEnd()
Set the stop time as current epoch time in microseconds.void
setStart()
Set the start time as current epoch time in microseconds.
-
-
-
Method Detail
-
getStart
public long getStart()
Get the start time as epoch time in microseconds.- Returns:
- the start time as epoch time in microseconds.
-
setStart
public void setStart()
Set the start time as current epoch time in microseconds.
-
getEnd
public long getEnd()
Get the stop time as epoch time in microseconds.- Returns:
- the stop time as epoch time in microseconds.
-
setEnd
public void setEnd()
Set the stop time as current epoch time in microseconds.
-
getTime
public long getTime()
Get the microseconds between the stop and start time.- Returns:
- difference between stop and start in microseconds. If one of the variables is not initialized, it returns -1
-
-