Hack with usleep() to hopefully make this better.