Your fermentation script essentially does this right? If so I'll use that as a reference and see if I can come up with something...Couple things here:
If you want this to persist a script stop/start, use a global, otherwise use a script variable.
Create a global/variable to save your "snapshot in time", then create a global to hold your change value. Every time interval, compare the real time value to the snapshot value, and write this to the change value global.. Once you have the change per time unit, you can extrapolate that out to other time units. Once all the math is done, update your snapshot with the real time value then loop the script and wait for the next update.
Enter your email address to join: