mirror of https://github.com/apache/cloudstack.git
Added a method to tell if the inaccurate clock is keeping up with the current time
This commit is contained in:
parent
5fc13a63b1
commit
a0ea38eb24
|
|
@ -48,6 +48,14 @@ public class InaccurateClock extends StandardMBean implements InaccurateClockMBe
|
|||
}
|
||||
}
|
||||
|
||||
@Override public long[] getCurrentTimes() {
|
||||
long[] results = new long[2];
|
||||
results[0] = time;
|
||||
results[1] = System.currentTimeMillis();
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized String restart() {
|
||||
turnOff();
|
||||
|
|
|
|||
|
|
@ -7,4 +7,6 @@ public interface InaccurateClockMBean {
|
|||
String restart();
|
||||
|
||||
String turnOff();
|
||||
|
||||
long[] getCurrentTimes();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue