main.c:   Optimize delay mechanism.