Test trader
This commit is contained in:
parent
57a4089051
commit
989643d7b1
@ -1,4 +1,4 @@
|
||||
#Thu, 20 Dec 2018 10:46:44 +0100
|
||||
#Thu, 20 Dec 2018 17:05:11 +0100
|
||||
annotation.processing.enabled=true
|
||||
annotation.processing.enabled.in.editor=false
|
||||
annotation.processing.processors.list=
|
||||
|
@ -83,11 +83,17 @@ public class SimpleTrader extends AbstractTrader implements EventListener{
|
||||
// setStatus("Inital delay: %d", delay);
|
||||
// timerTask = se.timer.startTimerTask(this, delay);
|
||||
}
|
||||
|
||||
long last_time = 0;
|
||||
|
||||
@Override
|
||||
public long receive(Event task) {
|
||||
// System.out.printf("Here we are !!! %f\n", getWorld().randNextFloat(12f, 27f));
|
||||
System.out.printf("Here we are: %d - %d (%d)\n",Thread.currentThread().getId(),System.nanoTime()/1000,task.t );
|
||||
|
||||
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 );
|
||||
getWorld().schedule(this, 1000);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user