×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Capturing run time

Capturing run time

Capturing run time

(OP)
Hi,

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

Regards

RE: Capturing run time

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)

RE: Capturing run time

(OP)
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

RE: Capturing run time

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

RE: Capturing run time

(OP)
Thanks for the explanation Alex.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources