net.sourceforge.basher.internal.impl
Class TimeSourceImpl

java.lang.Object
  extended by net.sourceforge.basher.internal.impl.TimeSourceImpl
All Implemented Interfaces:
EventListener, BasherEventListener, TimeSource

public class TimeSourceImpl
extends Object
implements TimeSource, BasherEventListener

Author:
Johan Lindquist

Constructor Summary
TimeSourceImpl()
           
 
Method Summary
 void basherEvent(BasherEvent basherEvent)
           
 long getCurrentTime()
          Returns the current time in the system.
 long getElapsedTime()
          Returns the elapsed time of the running system.
 long getNanoTime()
          Produces the current nanontime.
 long getStartTime()
          Returns the time the system was started.
 void reset()
          Resets the internal time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeSourceImpl

public TimeSourceImpl()
Method Detail

getElapsedTime

public long getElapsedTime()
Description copied from interface: TimeSource
Returns the elapsed time of the running system. Measured in milliseconds.

Specified by:
getElapsedTime in interface TimeSource
Returns:
The elapsed time since start-up.

getStartTime

public long getStartTime()
Description copied from interface: TimeSource
Returns the time the system was started. Measured in milliseconds since Midnight 1st January 1970.

Specified by:
getStartTime in interface TimeSource
Returns:
The start time.

getCurrentTime

public long getCurrentTime()
Description copied from interface: TimeSource
Returns the current time in the system. Measured in milliseconds since Midnight 1st January 1970.

Specified by:
getCurrentTime in interface TimeSource
Returns:
The current time.

reset

public void reset()
Description copied from interface: TimeSource
Resets the internal time.

Specified by:
reset in interface TimeSource

getNanoTime

public long getNanoTime()
Description copied from interface: TimeSource
Produces the current nanontime. See System.nanoTime() for more information

Specified by:
getNanoTime in interface TimeSource
Returns:

basherEvent

public void basherEvent(BasherEvent basherEvent)
Specified by:
basherEvent in interface BasherEventListener


Copyright © 2006-2010 Basher Team. All Rights Reserved.