Removed t from event
This commit is contained in:
parent
989643d7b1
commit
d17d09df31
@ -93,7 +93,7 @@ public class SimpleTrader extends AbstractTrader implements EventListener{
|
||||
long diff = getWorld().currentTimeMillis()-last_time;
|
||||
last_time = getWorld().currentTimeMillis();
|
||||
|
||||
System.out.printf("Here we are: %d - [%d] (%d)\n",Thread.currentThread().getId(),diff,task.t );
|
||||
System.out.printf("Here we are: %d - [%d]\n",Thread.currentThread().getId(),diff);
|
||||
getWorld().schedule(this, 1000);
|
||||
return -1;
|
||||
}
|
||||
|
@ -33,9 +33,7 @@ package opensesim.world.scheduler;
|
||||
public class Event {
|
||||
|
||||
EventListener listener;
|
||||
|
||||
public long t;
|
||||
|
||||
|
||||
Event(EventListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
@ -99,7 +99,6 @@ public class Scheduler {
|
||||
public Event startTimerTask(EventListener listener, long time) {
|
||||
Event e = new Event(listener);
|
||||
long t = time + clock.currentTimeMillis();
|
||||
e.t=t;
|
||||
synchronized (event_queue) {
|
||||
LinkedList<Event> s = event_queue.get(t);
|
||||
if (s == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user