/**
 * Copyright (c) 2000,1,2,3,4,5 visualtrading.org
 *
 * @author thanos vassilakis
 *
 */
package org.visualtrading.util;

public abstract class TimerThreadListener implements Runnable {

    private int period;

    private long timeLine = 0;

    /**
     *
     */
    public TimerThreadListener(int _period) {
        super();
        if (_period <= 0) {
            throw new IllegalArgumentException("Period can not be <= 0");
        }

        this.period = _period;
    }

    /**
     * @return Returns the period.
     */
    public int getPeriod() {
        return this.period;
    }

    public long getTimeLine() {
        return timeLine;
    }

    public void timerTick(long delta) {
        timeLine += delta;
        if (timeLine % period == 0) {
            run();
        }
    }
}
@@ -81,16 +81,39 @@
 lakis%0A *
+ @author yarik chinskiy
 %0A */%0Apac
@@ -821,8 +821,9 @@
 %0A    %7D%0A%7D
+%0A

Update TimerThreadListener.java