}
}
private void installTimer(final String stepHash) {
final long startTime = System.currentTimeMillis();
Timer newTimer = new Timer(1000, new ActionListener() {
public void actionPerformed(ActionEvent e) {
synchronized(LogPanel.this) {
if (m_tableIndexes.containsKey(stepHash)) {
final Integer rn = m_tableIndexes.get(stepHash);
long elapsed = System.currentTimeMillis() - startTime;
long seconds = elapsed / 1000;
long minutes = seconds / 60;
final long hours = minutes / 60;
seconds = seconds - (minutes * 60);
minutes = minutes - (hours * 60);
final long seconds2 = seconds;
final long minutes2 = minutes;
if (!SwingUtilities.isEventDispatchThread()) {
try {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
m_tableModel.
setValueAt("" + hours + ":" + minutes2 + ":" + seconds2, rn.intValue(), 2);
}
});
} catch (Exception ex) {
ex.printStackTrace();
}
} else {
m_tableModel.
setValueAt("" + hours + ":" + minutes2 + ":" + seconds2, rn.intValue(), 2);
}
}
}
}
});
m_timers.put(stepHash, newTimer);
newTimer.start();
}