i have something like this
long start = System.nanoTime();//computation begins //execute method long end = System.nanoTime();//computation ends long time = end-start; System.out.println(time + " nanoseconds");
how can i make the number display as
i tried this
long time = (end-start)/1000000L;
but it rounds off to 1 digit and no decimal places.
and yes i have tried System.currentTimeMillis(); - it displays one digit as well with no decimal places.
This post has been edited by YES i failed: 04 November 2010 - 05:44 PM