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...