net.sourceforge.basher.internal
Interface TimeSource

All Known Implementing Classes:
TimeSourceImpl

public interface TimeSource

Defines time based operations. Allows operations for determining run-time since initialization.

Version:
1.0
Author:
Johan Lindquist

Method Summary
 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.
 

Method Detail

getElapsedTime

long getElapsedTime()
Returns the elapsed time of the running system. Measured in milliseconds.

Returns:
The elapsed time since start-up.

getStartTime

long getStartTime()
Returns the time the system was started. Measured in milliseconds since Midnight 1st January 1970.

Returns:
The start time.

getCurrentTime

long getCurrentTime()
Returns the current time in the system. Measured in milliseconds since Midnight 1st January 1970.

Returns:
The current time.

reset

void reset()
Resets the internal time.


getNanoTime

long getNanoTime()
Produces the current nanontime. See System.nanoTime() for more information

Returns:


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