Each thread could get the time it started by calling the System class's currentTimeMillis() method when it starts and call it later in execution and compute the duration the thread has run by subtracting the start value from the current value . When the user time has run out, the thread would exit.
NormR1 563 Posting Sage Team Colleague
NormR1 563 Posting Sage Team Colleague
Arabian filly commented: sorry it was by mistake +0
ibthevivin commented: Thanks for the suggestion. It helps. +1
jalpesh_007 commented: nice artice... +2
NormR1 563 Posting Sage Team Colleague
NormR1 563 Posting Sage Team Colleague
gelmi commented: if i will put total += (what would i put here?) +0
jalpesh_007 commented: thnks for suggestion..i have completed it. +0