Click to See Complete Forum and Search --> : Something like time()???
DJRobThaMan
05-23-2006, 01:00 AM
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
Waylander
05-23-2006, 01:59 AM
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.
DJRobThaMan
05-23-2006, 04:31 PM
Thanks a lot. This really helped. I actually got my code to work now.
Douglas
Waylander
05-23-2006, 08:56 PM
No worries. :)
Waylander.