assertTrue("ERROR: refresh failed", (Math.abs(5500L - diffT) <= 30));
keyArr[0] = timeout.addTimeoutListener(dummy, 1000L, "timer-1000");
keyArr[1] = timeout.addTimeoutListener(dummy, 1000L, "timer-1000");
long span = timeout.spanToTimeout(keyArr[2]);
assertTrue("*****ERROR: This short span to timeout = " + span + " is probably wrong, or you have a very slow computer.", span >= 3000L);
Timestamp key = timeout.addTimeoutListener(dummy, 1000L, "timer-1000");
timeout.removeTimeoutListener(key);
try { key = timeout.refreshTimeoutListener(key, 1500L); } catch (XmlBlasterException e) { log.info("Refresh failed which is OK (it is a test): " + e.getMessage()); }