title: System.nanoTime() equivalent in C
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/275004/c-timer-function-to-provide-time-in-nano-seconds">C++ Timer function to provide time in nano seconds</a>  </p>
  </blockquote>
  
  
  
  <p>I need to get out of a loop when approaching 3 seconds, so I need to calculate the elapsed time.</p>
  
  <p>I'm moving some code from Java to C, and I was using the easy System.nanoTime() in Java,</p>
  
  <p>How would I do that in C?</p>
  
  <p>I noticed that time(NULL) will return the seconds, but I'm looking for more precision.</p>
  
  <p>Thank you in advance</p>