I made a very very small script that might be useful to some of OpenSees users. Earlier I had to use a stopwatch to see what is the time required for a particular analysis and so I used following script.
Place the following line at the start of master tcl input file (say all.tcl)
Code: Select all
set startTime [clock clicks -milliseconds]
And finally at the end put following lines of same master file (i.e. all.tcl)
Code: Select all
set finishTime [clock clicks -milliseconds];
set timeSeconds [expr ($finishTime-$startTime)/1000];
set timeMinutes [expr ($timeSeconds/60)];
set timeHours [expr ($timeSeconds/3600)];
set timeMinutes [expr ($timeMinutes - $timeHours*60)];
set timeSeconds [expr ($timeSeconds - $timeMinutes*60 - $timeHours*3600)];
puts "\n----------------------------------";
#puts "\a";
puts "TOTAL TIME TAKEN $timeHours:$timeMinutes:$timeSeconds";
Thanks.