Example usage for javax.swing Timer getDelay

List of usage examples for javax.swing Timer getDelay

Introduction

In this page you can find the example usage for javax.swing Timer getDelay.

Prototype

public int getDelay() 

Source Link

Document

Returns the delay, in milliseconds, between firings of action events.

Usage

From source file:fr.duminy.jbackup.core.JBackupImplTest.java

private void waitEndOfTimerIfAny(Timer timer) throws InterruptedException {
    if (timer != null) {
        long timeout = currentTimeMillis() + 5 * timer.getDelay();
        while (timer.isRunning()) {
            if (currentTimeMillis() > timeout) {
                fail("timer not stopped");
            }/*  w w w.j ava 2  s .c o m*/
            Thread.sleep(100);
        }
    }
}