Use usleep which takes an int in microseconds. (i.e. 1,000,000 microseconds is equivalent to 1 second) So for 0.1s use:
// Sleep for 0.1s usleep(100000)
Recommend to use in a background thread. You certainly don't want to be doing this on the main UI Thread!