public class TimeStampManager extends Object
Constructor and Description |
---|
TimeStampManager()
Constructs a
TimeStampManager using the current time to
initialize both the previous and update time stamps. |
Modifier and Type | Method and Description |
---|---|
long |
getMsSpanned()
Determines the number of milliseconds spanned between the latest (update)
time stamp and the oldest (previous) time stamp, accounting for roll-over
of the time stamp.
|
long |
getPreviousTimeStamp()
Gets the previous time stamp.
|
long |
getUpdateTimeStamp()
Gets the update time stamp.
|
void |
setPreviousTimeStamp(long time)
Sets the previous time stamp.
|
void |
setUpdateTimeStamp(long time)
Sets the update time stamp.
|
String |
toDebugString()
Gets a detailed representation of this object to facilitate debugging.
|
String |
toString() |
void |
updateTimeStamp()
Convenience method that sets the update time stamp to the current time.
|
public TimeStampManager()
TimeStampManager
using the current time to
initialize both the previous and update time stamps.public long getPreviousTimeStamp()
public long getMsSpanned()
public long getUpdateTimeStamp()
public void setPreviousTimeStamp(long time)
time
- previous time stamppublic void setUpdateTimeStamp(long time)
time
- update time stamppublic String toDebugString()
public void updateTimeStamp()
Copyright © 2016. All Rights Reserved.