long delayMillis = delay * 1000;
long delayMillis = delay * 1000L;
    public static void waitForDelay( int delay )    {        if ( delay > 0 )        {            // delay is in seconds            long delayMillis = delay * 1000;            long startTime = System.currentTimeMillis();            while ( ( System.currentTimeMillis() - startTime ) < delayMillis )            {                try                {                    Thread.sleep( 250 );                }                catch ( InterruptedException e )                {                    log.warn( "Got interrupted while waiting for delay before shutdown", e );                }            }        }    }