Mercurial > projects > dwt2
comparison base/src/java/util/TimerTask.d @ 27:1bf55a6eb092
Renamed java tree to base
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 21 Mar 2009 11:33:57 +0100 |
parents | java/src/java/util/TimerTask.d@9b96950f2c3c |
children |
comparison
equal
deleted
inserted
replaced
26:f589fc20a5f9 | 27:1bf55a6eb092 |
---|---|
1 module java.util.TimerTask; | |
2 | |
3 import java.lang.all; | |
4 import java.util.Timer; | |
5 | |
6 class TimerTask : Runnable { | |
7 | |
8 package long scheduled; | |
9 package long lastExecutionTime; | |
10 package long period; | |
11 package bool fixed; | |
12 | |
13 this(){ | |
14 this.scheduled = 0; | |
15 this.lastExecutionTime = -1; | |
16 } | |
17 | |
18 bool cancel(){ | |
19 bool prevented_execution = (this.scheduled >= 0); | |
20 this.scheduled = -1; | |
21 return prevented_execution; | |
22 } | |
23 | |
24 abstract void run(); | |
25 | |
26 long scheduledExcecutionTime(){ | |
27 return lastExecutionTime; | |
28 } | |
29 } | |
30 | |
31 |