title: System.nanotime giving negative numbers
body: <p>I writing an android timer app that uses System.nanotime. The issue is that it's giving me underpredicted results as well negative numbers. redVal, blueVal, and greenVal are updated on each frame of the camera.</p>
  
  <p>results</p>
  
  <pre><code>504455566
  -95947265
  9063721
  61035
  -99487305
  -98937988
  12664795
  -75317382
  </code></pre>
  
  <p>code</p>
  
  <pre><code>        for (testAmount = 0; testAmount &lt; 80; testAmount++) {
              runOnUiThread(new Runnable() {
                  public void run() {
                      lagSquare.setBackgroundColor(Color.rgb(255, 255, 255));
                      lagStartTime = System.nanoTime(); //start lagTimer start
                  }
              });
              while (redVal &lt;= 100.0 &amp;&amp; blueVal &lt;= 100.0 &amp;&amp; greenVal &lt;= 100.0) {
                  x=0;
              }
              runOnUiThread(new Runnable() {
                  public void run() {
                      lagEndTime = System.nanoTime(); //start lagTimer end
                      lagSquare.setBackgroundColor(Color.rgb(000, 000, 000));//set lagSquare black
                  }
              });
              lagTimeResult = (lagEndTime - lagStartTime);
              timeArray[testAmount] = lagTimeResult;
              Log.i("LTR", String.valueOf(lagTimeResult));
              try {
                  Thread.sleep(60);
              } catch (InterruptedException e) {
                  e.printStackTrace();
              }
          }
  </code></pre>