Mercurial > projects > dwt2
view base/src/java/util/TimerTask.d @ 75:0b015f5925d8
Fix HashMap.remove, thank to yidabu for the testcase.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 11 Apr 2009 11:32:49 +0200 |
parents | 1bf55a6eb092 |
children |
line wrap: on
line source
module java.util.TimerTask; import java.lang.all; import java.util.Timer; class TimerTask : Runnable { package long scheduled; package long lastExecutionTime; package long period; package bool fixed; this(){ this.scheduled = 0; this.lastExecutionTime = -1; } bool cancel(){ bool prevented_execution = (this.scheduled >= 0); this.scheduled = -1; return prevented_execution; } abstract void run(); long scheduledExcecutionTime(){ return lastExecutionTime; } }