How to track how long a program method takes to execute?

So i am writing a radix sort in java and i want to see how long it takes to run. I was wondering how i would get the exact time that a method would take?
Calendar cal = new GregorianCalendar();
          int ms = cal.get(Calendar.MILLISECOND);
I am not sure where to start from here or if this is even the correct way to do it, Any help would be great : ).

You can use System.currentTimeMillis. Call it before the method starts and after the method ends. Subtract the two values and your result will be how many milliseconds it took.

Similar Messages

  • How long does the book take to be delivered to my home?

    How long does the book take to be delivered to my home?
    Thank you

    Is it an Apple PhotoBook?
    what shipping method did you choose?
    what country are you in?
    See shipping information under yoru country here - http://store.apple.com/us/help/print_products/routing
    LN

  • Using the warp tool I'm stabilizing  my video and getting rid of the edge artifacts. Analyizing is clear on how long the process will take, but when it stabilizes I only get three moving dots. I there a way to know when the process will stop? Thanks.

    I am using the warp tool to stabilize my video and get rid of the edge artifacts.  The program is very clear about how long it will take to analyze, but there is nothing about how long the stabilization will take nor when I know when it is complete.   Thanks ahead of time.

    Warp Stabilising is a two part process.
    Analysis and Stabilising.
    Both have a banner across the Program Monitor during the process ( unless you have turned that off.
    Analysis start automatically on forst application...but you can rock in there and start adjusting the parameters.
    You may need to hit "Analyse" Button again.
    You should see the number of frames and the estimated duration during this process.

  • How long will UK delivery take for a iPhone4s and iPod Touch 5th gen?

    how long will UK delivery take for a iPhone4s and iPod Touch 5th gen?

    Water damage voids your warranty, so you only option with Apple is an out of warranty exchange.  You can check what that fee would be in your country on the support pages.
    Note that since Apple does not (and never has) repair iOS devices (they exchange them with factory refurbished units), there is no Apple certified training program for iOS repairs, no official parts supply and hence no such thing as an Apple Authorized repair technician or center for any iOS device.  Any repairs you have done by a 3rd party shop you do on your own and you must be prepared to live with the results, whatever they are, as Apple will not accept a device that has been worked on by someone else.

  • How long does it normally take to download a 2.8gb film to a brand new ipod touch ?

    How long does it normally take to download a 2.8gb film to a new ipod touch ? - I'm using a wireless internet connection with a strong signal (speed 300mbps), but looks like it could take hours - that cant be right ?.  So far just 700mb have been downloaded in over an hour and a half.

    3 hours more.

  • How long is it gonny take for me to download the latest update for my iphone5

    how long is it gonny take for me to download the latest update for my iphone5?

    iPhone 5 running iOS 6. Am I wrong?

  • So I created an account yesterday and I still havn't gotten the verification email. How long does it usually take to recieve that?

    I can't use my $25 card because I havn't gotten the verification email, but I set up my account last night and I keep trying to resend the email, but I still havn't got anything yet. How long does it usually take to get it?

    What model iPhone you have is completely irrelevant. How long it will take to download iTunes is dependent on the speed of your Internet connection.

  • I have been sent an email saying my podcast was accepted and will be up on iTunes in a few hours. That was 5 hours ago. How long should this process take?

    I have been sent an email saying my podcast was accepted and will be up on iTunes in a few hours. That was 5 hours ago. How long should this process take?

    There's no fixed time. If it's been accepted - presumably you've been given a URL? - it should appear reasonably soon. However it can dake some days before it turns up in the search results. The podcast image, if you have one, may also take some days to appear.

  • HT1544 how long should this update take?

    I am intalling leopar 10.5 on my computer. It's been "intalling" for over 3 hours now. How long should this usually take if you intall it via DVD?

    Welcome to Apple Support Communities
    It shouldn't take that amount of time. What is the screen showing? Is the progress bar frozen? The only solution would be to restart your Mac, but it's better to first check what your screen is showing

  • How long should "Disk Repair" take?

    I have a G Raid 4 T external drive that I recently had shipped back from my editor. She did not use the original packing box and I fear the drive could be damaged. It starts up okay and doesn't make any suspicious noises - but it doesn't mount. I ran disk utility and it told me I need to run "Disk Repair." I've been doing this - for more than an hour so far. How long should this typically take? Should I try something else?

    It's usually related to the size of the drive, which in your case, is pretty big.

  • How long does it usually take to get added raw support (nex5n)?  i pretty much just use aperture 3 and love it but why does lightroom from adobe seem to get raw support faster than Apple's Aperture 3.  Also FCPX lacks v Adobe on 60p.

    How long does it usually take to get raw support for Aperture 3?  Is it slowed by Apple or camera company.  I only ask because Lightroom has support for nex5n raw but Aperture 3 does not.  Also direct import into Adobe premiere  and ability to edit in 60p.  However, support for 60 p not as easily worked with in FCPX.  I am just surprised Apple does not keep pace with these type of updates that Adobe does.  Don't get me wrong I love and use Apple software  when I can but I wish Apple was ahead of adobe in getting this support.  I guess more of a vent than a question.

    Yes, more of a vent.
    FWIW I agree. 
    Camera companies keep RAW specs confidential so firms like Apple and Adobe have to (sort of) reverse-engineer to develop RAW converters for each new camera. The good news is to my eyes/brain Apple usually does a slightly better job at it than Adobe does. The best RAW conversions (logically) come from the camera manufacturers.
    Apple gives up market share with slow support for new cameras. IMO really DUMB. It has at least been improving...
    -Allen

  • How long does it usually take to backup Adobe Premier projects?

    When you go into the Project Manager and back up the project, so that Premiere copies every file involved to a portable hard drive, along with the project file, so the project can be opened and edited on a different computer, how long does it take?
    I am currently backing up a project with over eight hours of footage in the work area so that I can continue working on it from another computer, and the backup does not seem to be progressing. I do not typically backup projects like this, I usually only save a new version of the project file, so I have no idea what to expect, and it seems to be taking a while.

    Usually till it is finished, give or take a few minutes.
    The question resembles: "How long does it usually take to travel from A to B?"
    The answer is: It depends. It depends on traffic jams on the route (what are the specs of your system), the transportation means (what kind of portable hard disk and the interface), the amount of luggage taken along (how much source material and what codec), does one take a rest while en route or stop for gas (what background processes are running), etc.

  • How long does it usually take to charge your card for an iTunes purchase?

    hi, i bought a song a few days ago and it still has not shown up on my debit card yet. How long does this usually take? Also the first time I purchased a song it didn't seem to download the same way the second one did and didn't show up at all in my purchases. Am I doing something wrong?

    It could be day or a week.

  • How long does mountain lion take to download?

    On average how long does mountain lion take to download from the app store?

    Always keep an eye on 'More like this', the column to the right of your initial post.    You will often find answers and direct leads to your questions there.
    In fact it relates to your ISP and the download speeds you have.   I believe it is 4GB in size.

  • How long does it normally take to convert from PDF to Excel files?

    How long does it normally take to convert from a PDF to Excel files?

    Sara-
    I did see your response.  Thanks.  The other thing that happened was after I enabled Adobe on my Dell it apparently knocked out my Mozilla.  Now I can't get internet connection unless I use Internet Explorer which I would prefer not to.  I'm going to visit our IT folks tomorrow and see if I can get some of this resolved.
    The PDF files I obtained that I am trying to transfer to Excel may be too complex because there is a great deal of extraneous text information in the basic document that lies outside of the tables I want to transfer.  I'm going to try and highlight the tables only and see if this works.
    Thanks for taking the time answering.
    Best,
    Henry

Maybe you are looking for