I think a nanosleep of 0.5s should be enough here.