Skip to content

Commit

Permalink
Queues now identify their type in debugger.
Browse files Browse the repository at this point in the history
  • Loading branch information
aufdemrand committed Jul 26, 2013
1 parent 86e572c commit cad13ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Expand Up @@ -11,4 +11,6 @@ public interface Delayable {

public void delayFor(Duration duration);

public boolean isDelayed();

}
Expand Up @@ -76,6 +76,13 @@ public void delayFor(Duration duration) {
delay_ticks = System.currentTimeMillis() + duration.getMillis();
}

@Override
public boolean isDelayed() {
if (delay_ticks > System.currentTimeMillis()) return true;

return false;
}


public TimedQueue(String id, Duration timing) {
super(id);
Expand Down Expand Up @@ -158,9 +165,8 @@ protected boolean shouldRevolve() {
if (paused) return false;

// If it's delayed, schedule it for later
if (delay_ticks > System.currentTimeMillis()) return false;
return !isDelayed();

return true;
}


Expand Down

0 comments on commit cad13ed

Please sign in to comment.