title: Reason behind additional error time in this timing code
body: <p>I've recently been working with some performance examples in java and came across this snippet:</p>
  
  <pre><code>long start = System.nanoTime();
  // code to be timed goes here...
  long finish = System.nanoTime();
  long error = System.nanoTime() - finish;
  long duration = finish - start - error;
  </code></pre>
  
  <p>Now I understand <strong>what</strong> the code is doing, but not necessarily <strong>why</strong> the <code>error</code> timing is also being subtracted?</p>
  
  <p>Plenty of times I've seen this kind of thing:</p>
  
  <pre><code>long start = System.nanoTime();
  // code to be timed goes here...
  long finish = System.nanoTime();
  long duration = finish - start;
  </code></pre>
  
  <p>But not this concept of the additional error timing before.</p>