title: Taking an Instance of A Time Variable When A Condition Is Met
body: <p>I am looking for a way to take an instance of a time variable when the else of an if is called as in the situation below, so then I can pass this time taken into another method. </p>
  
  <pre><code>double time = getRunningTime();
  ...
  if (..){
  
  }
  else{
    *TAKE AN INSTANCE OF VARIABLE TIME AT THIS POINT TO PASS TO ANOTHER
                             METHOD*
  }
  </code></pre>
  
  <p>However, if I now pass this into another method by</p>
  
  <pre><code>else{
    methodToCall(time)
  }
  </code></pre>
  
  <p>Then use this in the other method i.e</p>
  
  <pre><code>methodToCall(double time){
     double timeMinusRunningTimeOfIfInPreviousMethod = getRunningTime() - time
     ....
  }
  </code></pre>
  
  <p>the variable time will still be changing, however I want it to stay constant.</p>
  
  <p>Thanks, Jack</p>