www.webdeveloper.com
Results 1 to 4 of 4

Thread: Something like time()???

  1. #1
    Join Date
    Jul 2003
    Posts
    259

    Something like time()???

    Does anybody know any way of call some function that will alow me to capture the time at a certain point so that I can determine the time a block of code takes to execute? I've tried a few methods but none of them seem to work for me. I don't know what I'm doing wrong.

    Thanks,
    Douglas

  2. #2
    Join Date
    Apr 2005
    Location
    Perth, Australia
    Posts
    340
    Calendar.getInstance()

    That will get you a full date and time, then just get the minutes and seconds from it.

    You dont even really need the time, just save an instance before the block then get a new one and compare them it will give you a precise answer.

    Have a look at the calendar object in the API its pretty usefull.

    Waylander.
    Last edited by Waylander; 05-23-2006 at 02:04 AM.
    Perth Web Development
    Web Developer
    Perth, Western Australia

  3. #3
    Join Date
    Jul 2003
    Posts
    259
    Thanks a lot. This really helped. I actually got my code to work now.

    Douglas

  4. #4
    Join Date
    Apr 2005
    Location
    Perth, Australia
    Posts
    340
    No worries.

    Waylander.
    Perth Web Development
    Web Developer
    Perth, Western Australia

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles