I am not familiar with Java, but you need some sort of
system call Sleep(int timeout_msecs), so that the
process blocks until the timeout occurs. This
functionality is provided by the OS.
--- usernew <no_reply@...> wrote:
My program currently is structured as follows:
class TWS implements EWrapper {
public void requestdata(...)
public void tickPrice(...)
public void tickSize(...)
...
public void wait_trans() {
for(i=0; i < xxxxx; i++);
}
}
public class Main {
tws.connect();
for(i=0; i<n; i++)
tws.requestdata(...)
tws.wait_trans();
tws.disconnect();
}
Is there a better way to structure this program ?
My concern is wait_trans(). It is continuously
eating up cycles. My
program does not need to do anything while it is
waiting for the
arrays to be populated, but I would still like to
wait without
consuming cycles.
Thanks in advance
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup