Results 1 to 4 of 4
  1. #1
    javaplus is offline Member
    Join Date
    Nov 2007
    Posts
    97
    Rep Power
    0

    Default Method execution time

    I have few methods and I want to know the time it takes to execute each. Does java provides some support for that? I can sore the time before calling the method and then subtract it from the time the methods returns. But meanwhile, some other processes will also be running on my machine. So it wont depict the right picture.

    Thanks in advance.

  2. #2
    staykovmarin is offline Senior Member
    Join Date
    Nov 2007
    Location
    Newport, WA
    Posts
    141
    Rep Power
    0

    Default

    No there isn't built in support for that.

    I don't understand why that wont work? You are always going to have other processes running on your machine, there is no way to test method execution time WITHOUT any processes running.

  3. #3
    javaplus is offline Member
    Join Date
    Nov 2007
    Posts
    97
    Rep Power
    0

    Default

    Actually, I would like to know how much CPU cycles a function takes.
    I believe, there is not built in support for that.

    Thanks.

  4. #4
    javagk is offline Member
    Join Date
    Nov 2007
    Posts
    12
    Rep Power
    0

Similar Threads

  1. Package/Execution woes...
    By Hiro ZA in forum New To Java
    Replies: 2
    Last Post: 01-09-2008, 07:42 AM
  2. Execution methods Reflection
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-15-2007, 03:19 PM
  3. Time method
    By carderne in forum New To Java
    Replies: 5
    Last Post: 11-05-2007, 09:34 AM
  4. Time restricted method
    By toby in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 05:54 AM
  5. Execution cut
    By Eric in forum Advanced Java
    Replies: 1
    Last Post: 06-27-2007, 03:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •