You could have an array, and whenever the variable has its' value changed, you could push the amount it changed as well as the current time to the array. Like array.at(x,0) would be the time, and array.at(x,1) would be the amount it was changed.
Also in the same event (when the value is changed and array is modified), you can do a check to see if it has changed enough within a certain period by looping through the array(starting from end), until it goes past the period you want, and add up all the value changes while it loops. If the value it greater than what you want, then you can do whatever you want now and clear the array.