public void _watch() { long start = now(); while (true) { if (now() - start > _timeout) { _thread.interrupt(); break; } JwUtility.sleep(_delay); if (!_thread.isAlive()) { _ok = true; _thread = null; break; } } }