Hello, everyone! Been a while :3
Anyways, I'm trying to work on a small project, and I'm trying to calculate the estimated time remaining in a for loop.
I've been looking up different ways to do this, using different programming languages as examples.
Here's a python program I found that attempts to do this:
Code:
I tried to recreate it in TI-BASIC, and here's what I got so far..
(This is not optimized, It's more readable for my stupid brain to understand)
Code:
The code runs without errors, but it doesn't really wanna work. My end result I plan to have is the amount of SECONDS remaining for the function to complete.
Say if the loop was at 100 (50% done), and it took 3 seconds, the program would show 3 seconds left.
Anyways, I'm trying to work on a small project, and I'm trying to calculate the estimated time remaining in a for loop.
I've been looking up different ways to do this, using different programming languages as examples.
Here's a python program I found that attempts to do this:
Code:
start_time = get the current time
for i in range(1, 101):
# Do some work
current_time = get the current time
elapsed_time = current_time - start_time
time_left = 100 * elapsed_time / i - elapsed_time
print(time_left)
I tried to recreate it in TI-BASIC, and here's what I got so far..
(This is not optimized, It's more readable for my stupid brain to understand)
Code:
ClrHome:StartTmr→T
For(I,1,200
"do file operation crap here"
checkTmr(T→C
C-T→E
100*E/I-E
Output(1,1,I
Output(2,1,Ans
End
The code runs without errors, but it doesn't really wanna work. My end result I plan to have is the amount of SECONDS remaining for the function to complete.
Say if the loop was at 100 (50% done), and it took 3 seconds, the program would show 3 seconds left.