How Do I Count rate of change?

http://asp.dotnetheaven.com/howto/doc/PCDemo.aspx