public static Command delay ( final Command command , final int delay ) { return ( command == null ) ? null : new Command ( ) { public void execute ( ) { new Timer ( ) { @ Override public void run ( ) { command . execute ( ) ; } } . schedule ( delay ) ; } } ; }
Returns a command that when executed itself will execute the supplied command after the specified millisecond delay . For convenience purposes if a null command is supplied null is returned .