Display a future time
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Display a future time
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.
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
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
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
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
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
- Attachments
-
- ProgressbarWithEstimatedTime.livecode.zip
- (1.25 KiB) Downloaded 199 times
https://alternatic.ch
Re: Display a future time
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
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
Yep, "dateitems" is a very cool tool to manipulate/compute date and time!
Re: Display a future time
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
Craig Newman