FileDocCategorySizeDatePackage
TimingDelta.javaAPI DocGlassfish v2 API2779Fri May 04 22:31:06 BST 2007com.sun.appserv.management.util.misc

TimingDelta

public final class TimingDelta extends Object
Central registry of timing values. Not intended for threaded use.

Fields Summary
private long
mLastNanos
Constructors Summary
public TimingDelta()

        mLastNanos    = System.nanoTime();
    
Methods Summary
public longelapsed()

deprecated
use elapsedNanos

       return elapsedNanos();
    
public longelapsedMicros()

        return elapsed() / 1000;
    
public longelapsedMillis()

        return elapsed() / (1000 * 1000);
    
public longelapsedNanos()

        final long now = System.nanoTime();
        final long elapsed = now - mLastNanos;
        mLastNanos  = now;
        return elapsed;