haha, thats 500 ms! usleep takes args in micro secs so need to multiply by 1000 in the function definition