No need to sleep 25 ms, a bit longer will do fine too.