package etomica.graphics;
import etomica.integrator.IntegratorMD;
import etomica.units.Picosecond;
import etomica.units.PrefixedUnit;

/** 
 * DisplayBox to present the elapsed time in a
 * molecular dynamics simulation.
 */
public class DisplayTimer extends DisplayBox {

    public DisplayTimer(IntegratorMD integrator) {
        this(integrator.chronoMeter());
    }
    public DisplayTimer(IntegratorMD.ChronoMeter meter) {
        super(meter.integrator().simulation());
        this.setMeter(meter);
        this.setUnit(new PrefixedUnit(Picosecond.UNIT));
        this.setPrecision(7);
        graphic().setSize(100,60);
    }
}

@@ -19,16 +19,84 @@
 aphics;%0A
+import etomica.DataSource;%0Aimport etomica.data.DataSourceCountTime;%0A
 import e
@@ -402,174 +402,125 @@
 his(
-integrator.chronoMeter());%0A    %7D%0A    public DisplayTimer(IntegratorMD.ChronoMeter meter) %7B%0A        super(meter.integrator().simulation());%0A        this.setMeter(meter
+new DataSourceCountTime(integrator));%0A    %7D%0A    public DisplayTimer(DataSource dataSource) %7B%0A        super(dataSource
 );%0A 

update DisplayTimer