public class ClockAdjustment extends java.lang.Object implements CustomGlobalEncoder
HBScheduler
Constructor and Description |
---|
ClockAdjustment()
Default constructor with zero values
|
ClockAdjustment(double amount,
long time)
Object for sending the
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object[] |
encodeGlobalMessage() |
boolean |
equals(java.lang.Object other) |
double |
getAdjustmentAmount()
Return the amount that nwe need to adjust clock by
Used as a parameter to
HBScheduler.adjustScheduleTime(double, long) |
long |
getAdjustmentDuration()
The amount of time we will take to make the adjustment
Used as a parameter to
HBScheduler.adjustScheduleTime(double, long) |
ClockAdjustment |
restore(java.lang.Object restore_data)
Decode the data based on how it is encoded.
|
public ClockAdjustment(double amount, long time)
amount
- the amount of time we will be shifting in millisecondstime
- how long scheduler will take to do it in millisecondspublic ClockAdjustment()
public double getAdjustmentAmount()
HBScheduler.adjustScheduleTime(double, long)
public long getAdjustmentDuration()
HBScheduler.adjustScheduleTime(double, long)
public java.lang.Object[] encodeGlobalMessage()
encodeGlobalMessage
in interface CustomGlobalEncoder
public ClockAdjustment restore(java.lang.Object restore_data)
CustomGlobalEncoder
restore
in interface CustomGlobalEncoder
restore_data
- the encoded or decoded datapublic boolean equals(java.lang.Object other)
equals
in class java.lang.Object