Class MonitorClockImpl

  • All Implemented Interfaces:
    MonitorClock

    public class MonitorClockImpl
    extends java.lang.Object
    implements MonitorClock
    MonitorClock implementation.
    Author:
    Daniel Sagenschneider
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long currentTimeMillis()
      Obtains the approximate current time.
      void updateTime()
      Updates the current time.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MonitorClockImpl

        public MonitorClockImpl()
    • Method Detail

      • updateTime

        public void updateTime()
        Updates the current time.
      • currentTimeMillis

        public long currentTimeMillis()
        Description copied from interface: MonitorClock

        Obtains the approximate current time.

        This is more efficient means to obtain System.currentTimeMillis() as complete millisecond accuracy is not required.

        Specified by:
        currentTimeMillis in interface MonitorClock
        Returns:
        Approximate System.currentTimeMillis().