Avoid using delay for timing.