gamingtools
Interface StopWatch


public interface StopWatch

Used for timing the execution of a code segment.

See Also:
StopWatchSource

Method Summary
 long getResolution()
          The error expected in the measured elapsed time; meaning, the actual elapsed time is somewhere in the range of the measured elapsed time plus-or-minus this value.
 void start()
          Starts timing.
 long stop()
          Stops timing and returns the elapsed time in nanoseconds (10-9 seconds).
 

Method Detail

start

public void start()
Starts timing.


stop

public long stop()
Stops timing and returns the elapsed time in nanoseconds (10-9 seconds).

Returns:
The duration since start() was called.

getResolution

public long getResolution()
The error expected in the measured elapsed time; meaning, the actual elapsed time is somewhere in the range of the measured elapsed time plus-or-minus this value.

Returns:
Error expected in measured elapsed time in nanoseconds (10-9 seconds).