Package kieker.monitoring.timer
Class SystemMilliTimer
java.lang.Object
kieker.monitoring.timer.AbstractTimeSource
kieker.monitoring.timer.SystemMilliTimer
- All Implemented Interfaces:
ITimeSource
A timer implementation, counting in milliseconds since a specified offset.
- Since:
- 1.5
- Author:
- Jan Waller
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSystemMilliTimer(Configuration configuration) Creates a new instance of this class using the given parameters. -
Method Summary
Methods inherited from class kieker.monitoring.timer.AbstractTimeSource
getDefaultConfiguration
-
Field Details
-
CONFIG_OFFSET
The name of the configuration for the offset. -
CONFIG_UNIT
The name of the configuration for the time unit (0 = nanoseconds, 1 = microseconds, 2 = milliseconds, 3 = seconds).
-
-
Constructor Details
-
SystemMilliTimer
Creates a new instance of this class using the given parameters.- Parameters:
configuration- The configuration for this timer.
-
-
Method Details
-
getTime
public long getTime()- Returns:
- The timestamp for the current time in
TimeUnit. - See Also:
-
getOffset
public long getOffset()- Returns:
- The offset of the timesource to 1970-1-1 in
TimeUnit. - See Also:
-
getTimeUnit
- Returns:
- The
TimeUnitof the timesource.
-
toString
- Specified by:
toStringin interfaceITimeSource- Specified by:
toStringin classAbstractTimeSource- Returns:
- A String representation of the timesource. E.g., the meaning of a timestamp from this source.
-