#1069: Improved patch according to feedback in ticket

This commit is contained in:
dev
2015-04-08 17:49:28 +00:00
parent 44f8154f07
commit 4613e5f847

View File

@ -157,7 +157,7 @@ public class SimpleTimer2 {
*/
public void addPeriodicEvent(final SimpleTimer.TimedEvent event, final long timeoutMs) {
new PeriodicTimedEvent(SimpleTimer2.getInstance(), timeoutMs, timeoutMs) {
new PeriodicTimedEvent(this, timeoutMs, timeoutMs) {
@Override
public void timeReached() {
event.timeReached();
@ -179,7 +179,7 @@ public class SimpleTimer2 {
*/
public void addPeriodicEvent(final SimpleTimer.TimedEvent event, final long delay, final long timeoutMs) {
new PeriodicTimedEvent(SimpleTimer2.getInstance(), delay, timeoutMs) {
new PeriodicTimedEvent(this, delay, timeoutMs) {
@Override
public void timeReached() {
event.timeReached();