Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capturing run time

Status
Not open for further replies.

harshn

Civil/Environmental
Feb 2, 2007
24
0
0
US
Hi,

Can some one tell how can I capture the run-time of an analysis.

Regards
 
Replies continue below

Recommended for you

Hello,

you can use this code:

Code:
*get,wall1,active,,time,wall ! Start wall time

solve

*get,wall2,active,,time,wall ! End wall time

*msg,info,wl_solve,nint(100*wl_solve/60)/100,nint(100*wl_solve/3600)/100
%/Solving time: %g sec (%f min or %f hrs)
 
Hi @mihaiupb

Should wl_solve be substituted by wall2-wall1. It will be great if you can explain how are you formating the wall time in hrs min and seconds.

Thanks for your help

Regards
 
You are wright! I forgot to write:

wl_solve=wall2-wall1

The solving time in seconds is wl_solve by nature.

The solving time in minutes is wl_solve/60. Since I wanted to have only 2 decimal places, I must multiply the result of wl_solve/60 with 100, take the integer part of the result and then divide by 100.

Example:

wl_solve = 215.2747 sec
wl_solve/60 = 3.5879125 min
100*wl_solve/60 = 358.79125
nint(100*wl_solve/60) = 359
nint(100*wl_solve/60)/100 = 3.59 min

The same procedure applies for hours.

Regards,
Alex

 
Status
Not open for further replies.
Back
Top