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;
|
long diff = getWorld().currentTimeMillis()-last_time;
|
||||||
last_time = getWorld().currentTimeMillis();
|
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);
|
getWorld().schedule(this, 1000);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -34,8 +34,6 @@ package opensesim.world.scheduler;
|
|||||||
|
|
||||||
EventListener listener;
|
EventListener listener;
|
||||||
|
|
||||||
public long t;
|
|
||||||
|
|
||||||
Event(EventListener listener) {
|
Event(EventListener listener) {
|
||||||
this.listener = listener;
|
this.listener = listener;
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,6 @@ public class Scheduler {
|
|||||||
public Event startTimerTask(EventListener listener, long time) {
|
public Event startTimerTask(EventListener listener, long time) {
|
||||||
Event e = new Event(listener);
|
Event e = new Event(listener);
|
||||||
long t = time + clock.currentTimeMillis();
|
long t = time + clock.currentTimeMillis();
|
||||||
e.t=t;
|
|
||||||
synchronized (event_queue) {
|
synchronized (event_queue) {
|
||||||
LinkedList<Event> s = event_queue.get(t);
|
LinkedList<Event> s = event_queue.get(t);
|
||||||
if (s == null) {
|
if (s == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user