initial implementation of polled_delay