Changed delay to a counter from OSTimeDly to avoid blockingtask