Removed usleep in favour of a time based frame calculation