I gave things a good try at understanding before jumping in with my question, but here goes
I want to estimate when a test, that contains many sub-steps, of which I know how many (int32-scope) seconds each will take, will end, and be able to display the time and date the test is predicted to end.
We are talking in the neighborhood of 1,000 to 2,000 hours per test. Each test has either 40 or 80-ish cycles, each cycle happens to always add up to a days worth of time.
What I have done so far:
- Taken the available subs here, and changed to accept date and time string input
- I pass the current date and time (in strings) to the existing sub, it spits out (int64) seconds since the Epoch (year zero)
- I calculate how many seconds (int64) the remainder of the test will take (easily), and add it to the result from #2
- I want to be able to send this new date in the future (in seconds) to a similar function, and have it give me back a date and time
- I have started a reverse function to do exactly that, but I am getting myself stuck in writing it.
- In an attempt to not re-invent the wheel, I am searching for code that can guide me into making this reverse function. I have found Convert Seconds & Days Since Year 0-1970 which, its first demo on that page is what I need to create in Opto.
- Any thoughts (anyone?) on if I’m making this harder than it need be, or anywhere I can find the appropriate math to guide me?