Re: calculating run time for portions of code
- From: "Gerald W. Lester" <Gerald.Lester@xxxxxxx>
- Date: Fri, 20 Jun 2008 15:33:58 -0500
chedderslam wrote:
How would you calculate sections of code run times? For instance in
ColdFusion, there is the function gettickcount(), and you would do
something like this:
set starttime = gettickcount()
(code that you want to time)
set endtime = gettickcount()
set runtime = endtime - starttime
How would I do the same thing in tcl? I would prefer it to be in
milliseconds, if possible.
I am planning on using the ActiveState Tcl Devkit debugger to get the
values of the different time variables, rather than trying to write it
to output. Is there functionality that already does what I'm trying
to accomplish built in?
You can't get the run time, you can get the elapsed time (which may or may not be the same thing depending if there was a context switch during your execution).
Ron already told you how to get the elapsed time.
--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
.
- References:
- calculating run time for portions of code
- From: chedderslam
- calculating run time for portions of code
- Prev by Date: Re: calculating run time for portions of code
- Next by Date: Re: calculating run time for portions of code
- Previous by thread: Re: calculating run time for portions of code
- Next by thread: Sacred EIAS
- Index(es):
Relevant Pages
|