put Delay function  into hal file