Store the 'current' and 'previous' values in variables of the appropriate type (you didn't indicate any...) and the make the difference.
As about dividing by their time difference (provided your data type is divisible :rolleyes: ), you have to:
- Store 'current' and 'previous' times in
DateTime objects (use the
- Store the difference in a
- Use the appropriate property of the
TimeSpan object (for instance
TotalSeconds) as divisor.