title: How can I set one sensor to record data to a file every 10 milliseconds?
body: <p>I develop an android app for my final year project. This app must collect sensor smartphone information from accelerometer, gyroscope and magnetometer and to save them into a file. So far I have done everything, but now I have some problem with sampling rate frequency of sensors, I do not exactly know how to deal with that.</p>
  
  <p>I need a loop that will write to file every 10 milliseconds. I thought about a for loop but I don't know how to write the statement. </p>
  
  <p>I expect to save information to file every 10 milliseconds. </p>