source: lost-haven/main/EffectTimer.java

Last change on this file was 8edd04e, checked in by Dmitry Portnoy <dmitry.portnoy@…>, 4 years ago

Make the decompiled game code compile successfully

  • Property mode set to 100644
File size: 454 bytes
Line 
1package main;
2
3public class EffectTimer {
4
5 private Effect effect;
6 private long duration;
7 private long startTime;
8
9 public EffectTimer(Effect effect, long duration) {
10 this.effect = effect;
11 this.duration = duration;
12 this.startTime = System.currentTimeMillis();
13 }
14
15 public Effect getEffect() {
16 return this.effect;
17 }
18
19 public boolean expired() {
20 return (System.currentTimeMillis() - this.startTime >= this.duration);
21 }
22}
Note: See TracBrowser for help on using the repository browser.