Hi!
is there a way to get elapsed time during a loop execution? for exemple showing the elapsed time in label.text (second by second)
Forum topic · General Scripting
loop execution time
By B A · 2012-02-22
Forum topic · General Scripting
By B A · 2012-02-22
Hi!
is there a way to get elapsed time during a loop execution? for exemple showing the elapsed time in label.text (second by second)
Comments (4)
Comment policy
thank you all for yours inputs I didn't know timeStamp() function however what I wanted to do is real time chronometre but it seems impossible since even max render counter is not live :)
elapsed time + time left?
As I remember how Max measure elapsed time and time left for rendering statistic, in scripting it may look something like:
In other words (a bit fake) the calculation of the time left is based on the last elapsed time. Not perfect but better than nothing.
Use the progressbar control. I think that you can't calculate how long will take the loop execution. You can use counter and can show in label "processed/total count".
You can use timeStamp() to
You can use
to get the milliseconds since midnight I think, or use
to get date and time as a string. Do this at the start and end of your loop and calculate the difference (With
you'll have to do some string formatting, e.g. with
and with
you'd have to convert it to seconds, minutes etc. by division)
Cheers