new Thread(new Runnable() {
@Override public void run() {
//calculations #1
}
}).start();
new Thread(new Runnable() {
@Override public void run() {
//calculations #2
}
}).start();
1) I want to measure the execution time of any thread and then sum into a total-time variable. Can anyone explain me how?
2) If thread has only a cycle inside (for, while) and the cycle ends, also ends the thread?