Page 1 of 1

Display a future time

Posted: Tue Jan 08, 2013 10:32 am
by MikeC
I have a repeat loop processing a large data file.
I can get "the seconds" when it starts, and when it finishes the first pass.
Knowing how many repeats are involved, I can estimate how long the process will take.

But how can I add this value to the start time in order to display "Estimated finish time xxxx o'clock"

Thanks.

Re: Display a future time

Posted: Tue Jan 08, 2013 11:42 am
by bangkok
Convert will do the trick.

One example :

on mouseUp
put the time into abc
answer abc
convert abc to seconds
answer abc
add 120 to abc
convert abc from seconds to time
answer abc
end mouseUp

Re: Display a future time

Posted: Tue Jan 08, 2013 11:50 am
by jmburnod
Hi MikeC,

I put a little stack with an example that work on a loop with progressbar
It is not perfect but I think it is a good beginning

Best regards
Jean-Marc

Re: Display a future time

Posted: Tue Jan 08, 2013 3:06 pm
by MikeC
Thanks folks for these two good examples that put me in the right direction.

I ended up making use of the "dateItems" format, adding the number of anticipated seconds for the repeat loop to item 6 of this container.
Then converted it back to time format to display the actual time the process would finish.

Thanks again.

Mike

Re: Display a future time

Posted: Tue Jan 08, 2013 5:18 pm
by Klaus
Yep, "dateitems" is a very cool tool to manipulate/compute date and time!

Re: Display a future time

Posted: Tue Jan 08, 2013 8:56 pm
by dunbarx
I don't know how involved your repeat loop is, but you may want to use the "ticks" or the "milliseconds". Seconds seems like a lifetime, unless your execution time is of that order.

Craig Newman