I have a value that increases by unknown increments at unknown times. Given a time, I need to check how much it has increased between that time and now.
I could simply store every time/increase pair whenever the value is increased, but this would be too much data to reasonably store.
For example:
DATA:
Value = 0 @ 0:00
Value = 2 @ 0:04
Value = 7 @ 0:05
Value = 52 @ 0:07 (Current time)
RESULT:
1 Second: 52
3 Seconds: 2 + 7 + 52 = 61
I am not sure what I am trying to do is even possible. But, is there a way I can store the increments such that I can keep the file size reasonably small, and still find a decent approximation of the increase in the value? It does not need to be exact - a margin of error less than 5% would be acceptable.