title: How can I convert the result of System.nanoTime to a date in Java?
body: <p>I want to convert the result of <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/System.html#nanoTime--" rel="noreferrer"><code>System.nanoTime()</code></a> to a date.</p>
  
  <pre><code>public void tempBan(Player p, Player banner, int timeInSeconds){
      Long timeInNano = (long) (timeInSeconds * 10^9);
      int newTime = (int) (System.nanoTime() + timeInNano);
      // here I want to convert newTime to a date 
  }
  </code></pre>
  
  <p>I have converted the seconds into <a href="https://en.wikipedia.org/wiki/Nanosecond" rel="noreferrer">nanoseconds</a> by multiplying by 10^9. Now I need to convert the current system time plus the parameter which I converted into nanoseconds into a date.</p>