Java : how do you convert nanoseconds to seconds using the TimeUnit class?
<p>how do i convert this value from nano seconds to seconds?  </p>

<p>I have the following code segment: </p>

<pre><code>import java.io.*;
import java.util.concurrent.*; 
..

class stamper { 

public static void main (String[] args ){ 
long start = System.nanoTime(); 
//some try with nested loops 
long end = System.nanoTime(); 
long elapsedTime = end - start;

System.out.println("elapsed: " + elapsedTime + "nano seconds\n");

//convert to seconds 
TimeUnit seconds = new TimeUnit(); 
System.out.println("which is " + seconds.toSeconds(elapsedTime) + " seconds"); 
}}
</code></pre>

<p>The error I get is </p>

<pre><code>stamper.java:16:  enum types may not be instantiated.
</code></pre>

<p>I'm not sure what this means?  </p>
