Delay in a subroutine
Variable delay for on/off