Dreamlover

dream helps to start-end & again…

Getting the Excution time

Today morning I have taken some sample  statistics using the currentTimeMillis() method on a Object holding 10 milllion of data to find out particular data .This method I found after making a search to getting the Current Time masured in milli .

 So for calculate the Execution time of code..

  long StartTime=System.currentTimeMillis();

………………………………………code goes here…….

long EndTime=System.currentTimeMillis();

System.out.print(“Elapsed time:”+(EndTime-StartTime)); 

Any way, Sometimes it shows unexpected time.

Ok..keep in touch. 

Advertisement

July 4, 2006 - Posted by | Java

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.