#include <time.h> int ProSpeed(int framenum) {
static time_t rawtime; static time_t lastrawtime; static int speed; static int lastframe; time ( &rawtime );
if(rawtime-lastrawtime>=1) { speed=framenum-lastframe; lastrawtime=rawtime; lastframe=framenum; } return speed; }