Implement basic version of delay APIs using hardware timer