eal: customize delay function